Changeset ee24574 in mainline for uspace/lib/c


Ignore:
Timestamp:
2011-08-18T08:00:42Z (14 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a92cf94f
Parents:
0f963cb (diff), c53a705 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix changes.

Location:
uspace/lib/c
Files:
39 added
1 deleted
63 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/Makefile

    r0f963cb ree24574  
    3131ROOT_PATH = $(USPACE_PREFIX)/..
    3232
    33 INCLUDE_KERNEL = include/kernel
    34 INCLUDE_ARCH = include/arch
     33INCLUDE_ABI = include/abi
    3534INCLUDE_LIBARCH = include/libarch
    3635
     
    4746        $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
    4847
    49 PRE_DEPEND = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH)
     48PRE_DEPEND = $(INCLUDE_ABI) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH)
    5049EXTRA_OUTPUT = $(LINKER_SCRIPTS)
    51 EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH) $(LINKER_SCRIPTS)
     50EXTRA_CLEAN = $(INCLUDE_ABI) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH) $(LINKER_SCRIPTS)
    5251LIBRARY = libc
    5352SLIBRARY = libc.so.0.0
     
    6564        generic/cap.c \
    6665        generic/clipboard.c \
    67         generic/devmap.c \
    6866        generic/devman.c \
    6967        generic/device/hw_res.c \
     
    7270        generic/event.c \
    7371        generic/errno.c \
     72        generic/loc.c \
    7473        generic/mem.c \
    7574        generic/str.c \
     
    144143include $(USPACE_PREFIX)/Makefile.common
    145144
    146 $(INCLUDE_ARCH): $(INCLUDE_KERNEL) $(INCLUDE_KERNEL)/arch
    147         ln -sfn kernel/arch $@
    148 
    149145$(INCLUDE_LIBARCH): arch/$(UARCH)/include
    150146        ln -sfn ../$< $@
    151147
    152 $(INCLUDE_KERNEL)/arch: ../../../kernel/generic/include/arch $(INCLUDE_KERNEL)
    153 
    154 $(INCLUDE_KERNEL): ../../../kernel/generic/include/
     148$(INCLUDE_ABI): ../../../abi/include/
    155149        ln -sfn ../$< $@
    156150
  • uspace/lib/c/arch/abs32le/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Martin Decky
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup debug
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_abs32le__ISTATE_H_
    36 #define LIBC_abs32le__ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/abs32le/include/istate.h
  • uspace/lib/c/arch/abs32le/include/syscall.h

    r0f963cb ree24574  
    3838
    3939#include <sys/types.h>
    40 #include <kernel/syscall/syscall.h>
     40#include <abi/syscall.h>
    4141
    4242#define __syscall0  __syscall
  • uspace/lib/c/arch/abs32le/include/types.h

    r0f963cb ree24574  
    5353typedef int32_t intptr_t;
    5454typedef uint32_t uintptr_t;
     55typedef int32_t intptr_t;
    5556typedef uint32_t atomic_count_t;
    5657typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/amd64/include/elf_linux.h

    r0f963cb ree24574  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Definitions needed to write core files in Linux-ELF format.
    3333 */
    3434
     
    3939#include <sys/types.h>
    4040
     41/** Linux kernel struct pt_regs structure.
     42 *
     43 * We need this to save register state to a core file in Linux format
     44 * (readable by GDB configured for Linux target).
     45 */
    4146typedef struct {
    42         /* TODO */
    43         uint64_t pad[16];
     47        uint64_t r15;
     48        uint64_t r14;
     49        uint64_t r13;
     50        uint64_t r12;
     51        uint64_t rbp;
     52        uint64_t rbx;
     53        uint64_t r11;
     54        uint64_t r10;
     55        uint64_t r9;
     56        uint64_t r8;
     57        uint64_t rax;
     58        uint64_t rcx;
     59        uint64_t rdx;
     60        uint64_t rsi;
     61        uint64_t rdi;
     62        uint64_t old_rax;
     63        uint64_t rip;
     64        uint64_t cs;
     65        uint64_t rflags;
     66        uint64_t rsp;
     67        uint64_t ss;
    4468} elf_regs_t;
    4569
     70/** Convert istate_t to elf_regs_t. */
    4671static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    4772{
    48         /* TODO */
    49         (void) istate; (void) elf_regs;
     73        elf_regs->r15 = istate->r15;
     74        elf_regs->r14 = istate->r14;
     75        elf_regs->r13 = istate->r13;
     76        elf_regs->r12 = istate->r12;
     77        elf_regs->rbp = istate->rbp;
     78        elf_regs->rbx = istate->rbx;
     79        elf_regs->r11 = istate->r11;
     80        elf_regs->r10 = istate->r10;
     81        elf_regs->r9 = istate->r9;
     82        elf_regs->r8 = istate->r8;
     83        elf_regs->rax = istate->rax;
     84        elf_regs->rcx = istate->rcx;
     85        elf_regs->rdx = istate->rdx;
     86        elf_regs->rsi = istate->rsi;
     87        elf_regs->rdi = istate->rdi;
     88        elf_regs->rip = istate->rip;
     89        elf_regs->cs = istate->cs;
     90        elf_regs->rflags = istate->rflags;
     91        elf_regs->rsp = istate->rsp;
     92        elf_regs->ss = istate->ss;
    5093}
    5194
  • uspace/lib/c/arch/amd64/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcamd64
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_amd64_ISTATE_H_
    36 #define LIBC_amd64_ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/amd64/include/istate.h
  • uspace/lib/c/arch/amd64/include/types.h

    r0f963cb ree24574  
    5353typedef int64_t intptr_t;
    5454typedef uint64_t uintptr_t;
     55typedef int64_t intptr_t;
    5556typedef uint64_t atomic_count_t;
    5657typedef int64_t atomic_signed_t;
  • uspace/lib/c/arch/amd64/src/fibril.S

    r0f963cb ree24574  
    3232.global context_restore
    3333
    34 #include <kernel/arch/context_offset.h>
     34#include <libarch/context_offset.h>
    3535
    3636## Save current CPU context
  • uspace/lib/c/arch/arm32/include/elf_linux.h

    r0f963cb ree24574  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Definitions needed to write core files in Linux-ELF format.
    3333 */
    3434
     
    3939#include <sys/types.h>
    4040
     41/** Linux kernel struct pt_regs structure.
     42 *
     43 * We need this to save register state to a core file in Linux format
     44 * (readable by GDB configured for Linux target).
     45 */
    4146typedef struct {
    42         /* TODO */
    43         uint32_t pad[16];
     47        uint32_t r0;
     48        uint32_t r1;
     49        uint32_t r2;
     50        uint32_t r3;
     51        uint32_t r4;
     52        uint32_t r5;
     53        uint32_t r6;
     54        uint32_t r7;
     55        uint32_t r8;
     56        uint32_t r9;
     57        uint32_t r10;
     58        uint32_t fp;
     59        uint32_t r12;
     60        uint32_t sp;
     61        uint32_t lr;
     62        uint32_t pc;
     63        uint32_t cpsr;
     64        uint32_t old_r0;
    4465} elf_regs_t;
    4566
     67/** Convert istate_t to elf_regs_t. */
    4668static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    4769{
    48         /* TODO */
    49         (void) istate; (void) elf_regs;
     70        elf_regs->r0 = istate->r0;
     71        elf_regs->r1 = istate->r1;
     72        elf_regs->r2 = istate->r2;
     73        elf_regs->r3 = istate->r3;
     74        elf_regs->r4 = istate->r4;
     75        elf_regs->r5 = istate->r5;
     76        elf_regs->r6 = istate->r6;
     77        elf_regs->r7 = istate->r7;
     78        elf_regs->r8 = istate->r8;
     79        elf_regs->r9 = istate->r9;
     80        elf_regs->r10 = istate->r10;
     81
     82        elf_regs->fp = istate->fp;
     83        elf_regs->r12 = istate->r12;
     84        elf_regs->sp = istate->sp;
     85        elf_regs->lr = istate->lr;
     86        elf_regs->pc = istate->pc;
     87        elf_regs->cpsr = istate->spsr;
     88        elf_regs->old_r0 = 0;
    5089}
    5190
  • uspace/lib/c/arch/arm32/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcarm32
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_arm32__ISTATE_H_
    36 #define LIBC_arm32__ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/arm32/include/istate.h
  • uspace/lib/c/arch/arm32/include/types.h

    r0f963cb ree24574  
    5454typedef int32_t intptr_t;
    5555typedef uint32_t uintptr_t;
     56typedef int32_t intptr_t;
    5657typedef uint32_t atomic_count_t;
    5758typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/ia32/include/elf_linux.h

    r0f963cb ree24574  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Definitions needed to write core files in Linux-ELF format.
    3333 */
    3434
     
    3939#include <sys/types.h>
    4040
     41/** Linux kernel struct pt_regs structure.
     42 *
     43 * We need this to save register state to a core file in Linux format
     44 * (readable by GDB configured for Linux target).
     45 */
    4146typedef struct {
    4247        uint32_t ebx;
     
    5964} elf_regs_t;
    6065
     66/** Convert istate_t to elf_regs_t. */
    6167static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    6268{
  • uspace/lib/c/arch/ia32/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup debug
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_ia32__ISTATE_H_
    36 #define LIBC_ia32__ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/ia32/include/istate.h
  • uspace/lib/c/arch/ia32/include/syscall.h

    r0f963cb ree24574  
    3838
    3939#include <sys/types.h>
    40 #include <kernel/syscall/syscall.h>
     40#include <abi/syscall.h>
    4141
    4242#define __syscall0  __syscall_fast_func
  • uspace/lib/c/arch/ia32/include/types.h

    r0f963cb ree24574  
    5353typedef int32_t intptr_t;
    5454typedef uint32_t uintptr_t;
     55typedef int32_t intptr_t;
    5556typedef uint32_t atomic_count_t;
    5657typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/ia32/src/fibril.S

    r0f963cb ree24574  
    2727#
    2828
    29 #include <kernel/arch/context_offset.h>
     29#include <libarch/context_offset.h>
    3030
    3131.text
  • uspace/lib/c/arch/ia32/src/setjmp.S

    r0f963cb ree24574  
    2727#
    2828
    29 #include <kernel/arch/context_offset.h>
     29#include <libarch/context_offset.h>
    3030
    3131.text
  • uspace/lib/c/arch/ia64/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcsparc64
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_ia64_ISTATE_H_
    36 #define LIBC_ia64_ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/ia64/include/istate.h
  • uspace/lib/c/arch/ia64/include/types.h

    r0f963cb ree24574  
    6363typedef int64_t intptr_t;
    6464typedef uint64_t uintptr_t;
     65typedef int64_t intptr_t;
    6566typedef uint64_t atomic_count_t;
    6667typedef int64_t atomic_signed_t;
  • uspace/lib/c/arch/mips32/include/elf_linux.h

    r0f963cb ree24574  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Definitions needed to write core files in Linux-ELF format.
    3333 */
    3434
     
    3939#include <sys/types.h>
    4040
     41/** Linux kernel struct pt_regs structure.
     42 *
     43 * We need this to save register state to a core file in Linux format
     44 * (readable by GDB configured for Linux target).
     45 */
    4146typedef struct {
    42         /* TODO */
    43         uint32_t pad[16];
     47        uint32_t pad0[6];
     48
     49        uint32_t r0;
     50        uint32_t r1;
     51        uint32_t r2;
     52        uint32_t r3;
     53        uint32_t r4;
     54        uint32_t r5;
     55        uint32_t r6;
     56        uint32_t r7;
     57        uint32_t r8;
     58        uint32_t r9;
     59        uint32_t r10;
     60        uint32_t r11;
     61        uint32_t r12;
     62        uint32_t r13;
     63        uint32_t r14;
     64        uint32_t r15;
     65        uint32_t r16;
     66        uint32_t r17;
     67        uint32_t r18;
     68        uint32_t r19;
     69        uint32_t r20;
     70        uint32_t r21;
     71        uint32_t r22;
     72        uint32_t r23;
     73        uint32_t r24;
     74        uint32_t r25;
     75        uint32_t r26;
     76        uint32_t r27;
     77        uint32_t r28;
     78        uint32_t r29;
     79        uint32_t r30;
     80        uint32_t r31;
     81
     82        uint32_t cp0_status;
     83        uint32_t hi;
     84        uint32_t lo;
     85        uint32_t cp0_badvaddr;
     86        uint32_t cp0_cause;
     87        uint32_t cp0_epc;
    4488} elf_regs_t;
    4589
     90/** Convert istate_t to elf_regs_t. */
    4691static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    4792{
    48         /* TODO */
    49         (void) istate; (void) elf_regs;
     93        elf_regs->r1 = istate->at;
     94        elf_regs->r2 = istate->v0;
     95        elf_regs->r3 = istate->v1;
     96        elf_regs->r4 = istate->a0;
     97        elf_regs->r5 = istate->a1;
     98        elf_regs->r6 = istate->a2;
     99        elf_regs->r7 = istate->a3;
     100        elf_regs->r8 = istate->t0;
     101        elf_regs->r9 = istate->t1;
     102        elf_regs->r10 = istate->t2;
     103        elf_regs->r11 = istate->t3;
     104        elf_regs->r12 = istate->t4;
     105        elf_regs->r13 = istate->t5;
     106        elf_regs->r14 = istate->t6;
     107        elf_regs->r15 = istate->t7;
     108        elf_regs->r16 = istate->s0;
     109        elf_regs->r17 = istate->s1;
     110        elf_regs->r18 = istate->s2;
     111        elf_regs->r19 = istate->s3;
     112        elf_regs->r20 = istate->s4;
     113        elf_regs->r21 = istate->s5;
     114        elf_regs->r22 = istate->s6;
     115        elf_regs->r23 = istate->s7;
     116        elf_regs->r24 = istate->t8;
     117        elf_regs->r25 = istate->t9;
     118        elf_regs->r26 = istate->kt0;
     119        elf_regs->r27 = istate->kt1;
     120        elf_regs->r28 = istate->gp;
     121        elf_regs->r29 = istate->sp;
     122        elf_regs->r30 = istate->s8;
     123        elf_regs->r31 = istate->ra;
     124
     125        elf_regs->cp0_status = istate->status;
     126        elf_regs->hi = istate->hi;
     127        elf_regs->lo = istate->lo;
     128        elf_regs->cp0_epc = istate->epc;
    50129}
    51130
  • uspace/lib/c/arch/mips32/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcmips32
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_mips32__ISTATE_H_
    36 #define LIBC_mips32__ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/mips32/include/istate.h
  • uspace/lib/c/arch/mips32/include/types.h

    r0f963cb ree24574  
    5454typedef int32_t intptr_t;
    5555typedef uint32_t uintptr_t;
     56typedef int32_t intptr_t;
    5657typedef uint32_t atomic_count_t;
    5758typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/mips32/src/fibril.S

    r0f963cb ree24574  
    3232.set noreorder
    3333
    34 #include <arch/context_offset.h>
     34#include <libarch/context_offset.h>
    3535       
    3636.global context_save
  • uspace/lib/c/arch/mips64/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcmips64
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_mips64__ISTATE_H_
    36 #define LIBC_mips64__ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/mips64/include/istate.h
  • uspace/lib/c/arch/mips64/include/types.h

    r0f963cb ree24574  
    5353
    5454typedef uint64_t uintptr_t;
     55typedef int64_t intptr_t;
    5556typedef uint64_t atomic_count_t;
    5657typedef int64_t atomic_signed_t;
  • uspace/lib/c/arch/mips64/src/fibril.S

    r0f963cb ree24574  
    3232.set noreorder
    3333
    34 #include <arch/context_offset.h>
     34#include <libarch/context_offset.h>
    3535
    3636.global context_save
  • uspace/lib/c/arch/ppc32/include/elf_linux.h

    r0f963cb ree24574  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Definitions needed to write core files in Linux-ELF format.
    3333 */
    3434
     
    3939#include <sys/types.h>
    4040
     41/** Linux kernel struct pt_regs structure.
     42 *
     43 * We need this to save register state to a core file in Linux format
     44 * (readable by GDB configured for Linux target).
     45 */
    4146typedef struct {
    42         /* TODO */
    43         uint32_t pad[16];
     47        uint32_t r0;
     48        uint32_t r1;
     49        uint32_t r2;
     50        uint32_t r3;
     51        uint32_t r4;
     52        uint32_t r5;
     53        uint32_t r6;
     54        uint32_t r7;
     55        uint32_t r8;
     56        uint32_t r9;
     57        uint32_t r10;
     58        uint32_t r11;
     59        uint32_t r12;
     60        uint32_t r13;
     61        uint32_t r14;
     62        uint32_t r15;
     63        uint32_t r16;
     64        uint32_t r17;
     65        uint32_t r18;
     66        uint32_t r19;
     67        uint32_t r20;
     68        uint32_t r21;
     69        uint32_t r22;
     70        uint32_t r23;
     71        uint32_t r24;
     72        uint32_t r25;
     73        uint32_t r26;
     74        uint32_t r27;
     75        uint32_t r28;
     76        uint32_t r29;
     77        uint32_t r30;
     78        uint32_t r31;
     79
     80        uint32_t nip;
     81        uint32_t msr;
     82        uint32_t old_r3;
     83        uint32_t ctr;
     84        uint32_t link;
     85        uint32_t xer;
     86        uint32_t ccr;
     87        uint32_t mq;
     88        uint32_t trap;
     89        uint32_t dar;
     90        uint32_t dsisr;
     91        uint32_t result;
    4492} elf_regs_t;
    4593
     94/** Convert istate_t to elf_regs_t. */
    4695static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    4796{
    48         /* TODO */
    49         (void) istate; (void) elf_regs;
     97        elf_regs->r0 = istate->r0;
     98        elf_regs->r1 = istate->sp;
     99        elf_regs->r2 = istate->r2;
     100        elf_regs->r3 = istate->r3;
     101        elf_regs->r4 = istate->r4;
     102        elf_regs->r5 = istate->r5;
     103        elf_regs->r6 = istate->r6;
     104        elf_regs->r7 = istate->r7;
     105        elf_regs->r8 = istate->r8;
     106        elf_regs->r9 = istate->r9;
     107        elf_regs->r10 = istate->r10;
     108        elf_regs->r11 = istate->r11;
     109        elf_regs->r12 = istate->r12;
     110        elf_regs->r13 = istate->r13;
     111        elf_regs->r14 = istate->r14;
     112        elf_regs->r15 = istate->r15;
     113        elf_regs->r16 = istate->r16;
     114        elf_regs->r17 = istate->r17;
     115        elf_regs->r18 = istate->r18;
     116        elf_regs->r19 = istate->r19;
     117        elf_regs->r20 = istate->r20;
     118        elf_regs->r21 = istate->r21;
     119        elf_regs->r22 = istate->r22;
     120        elf_regs->r23 = istate->r23;
     121        elf_regs->r24 = istate->r24;
     122        elf_regs->r25 = istate->r25;
     123        elf_regs->r26 = istate->r26;
     124        elf_regs->r27 = istate->r27;
     125        elf_regs->r28 = istate->r28;
     126        elf_regs->r29 = istate->r29;
     127        elf_regs->r30 = istate->r30;
     128        elf_regs->r31 = istate->r31;
     129
     130        elf_regs->ctr = istate->ctr;
     131        elf_regs->link = istate->lr;
     132        elf_regs->xer = istate->xer;
     133        elf_regs->ccr = istate->cr;
     134        elf_regs->dar = istate->dar;
    50135}
    51136
  • uspace/lib/c/arch/ppc32/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcppc32
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_ppc32_ISTATE_H_
    36 #define LIBC_ppc32_ISTATE_H_
    37 
    38 #include <sys/types.h>
    39 
    40 /** Interrupt context.
    41  *
    42  * This is a copy of the kernel definition with which it must be kept in sync.
    43  */
    44 typedef struct istate {
    45         uint32_t r0;
    46         uint32_t r2;
    47         uint32_t r3;
    48         uint32_t r4;
    49         uint32_t r5;
    50         uint32_t r6;
    51         uint32_t r7;
    52         uint32_t r8;
    53         uint32_t r9;
    54         uint32_t r10;
    55         uint32_t r11;
    56         uint32_t r13;
    57         uint32_t r14;
    58         uint32_t r15;
    59         uint32_t r16;
    60         uint32_t r17;
    61         uint32_t r18;
    62         uint32_t r19;
    63         uint32_t r20;
    64         uint32_t r21;
    65         uint32_t r22;
    66         uint32_t r23;
    67         uint32_t r24;
    68         uint32_t r25;
    69         uint32_t r26;
    70         uint32_t r27;
    71         uint32_t r28;
    72         uint32_t r29;
    73         uint32_t r30;
    74         uint32_t r31;
    75         uint32_t cr;
    76         uint32_t pc;
    77         uint32_t srr1;
    78         uint32_t lr;
    79         uint32_t ctr;
    80         uint32_t xer;
    81         uint32_t dar;
    82         uint32_t r12;
    83         uint32_t sp;
    84 } istate_t;
    85 
    86 static inline uintptr_t istate_get_pc(istate_t *istate)
    87 {
    88         return istate->pc;
    89 }
    90 
    91 static inline uintptr_t istate_get_fp(istate_t *istate)
    92 {
    93         return istate->sp;
    94 }
    95 
    96 #endif
    97 
    98 /** @}
    99  */
     1../../../../../../kernel/arch/ppc32/include/istate.h
  • uspace/lib/c/arch/ppc32/include/types.h

    r0f963cb ree24574  
    5353typedef int32_t intptr_t;
    5454typedef uint32_t uintptr_t;
     55typedef int32_t intptr_t;
    5556typedef uint32_t atomic_count_t;
    5657typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/ppc32/src/fibril.S

    r0f963cb ree24574  
    3333
    3434#include <libarch/regname.h>
    35 #include <arch/context_offset.h>
     35#include <libarch/context_offset.h>
    3636
    3737context_save:
  • uspace/lib/c/arch/sparc64/include/istate.h

    • Property mode changed from 100644 to 120000
    r0f963cb ree24574  
    1 /*
    2  * Copyright (c) 2010 Jiri Svoboda
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  *
    9  * - Redistributions of source code must retain the above copyright
    10  *   notice, this list of conditions and the following disclaimer.
    11  * - Redistributions in binary form must reproduce the above copyright
    12  *   notice, this list of conditions and the following disclaimer in the
    13  *   documentation and/or other materials provided with the distribution.
    14  * - The name of the author may not be used to endorse or promote products
    15  *   derived from this software without specific prior written permission.
    16  *
    17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 /** @addtogroup libcsparc64
    30  * @{
    31  */
    32 /** @file
    33  */
    34 
    35 #ifndef LIBC_sparc64_ISTATE_H_
    36 #define LIBC_sparc64_ISTATE_H_
    37 
    38 #include <arch/istate.h>
    39 
    40 #endif
    41 
    42 /** @}
    43  */
     1../../../../../../kernel/arch/sparc64/include/istate.h
  • uspace/lib/c/arch/sparc64/include/syscall.h

    r0f963cb ree24574  
    3737
    3838#include <sys/types.h>
    39 #include <kernel/syscall/syscall.h>
     39#include <abi/syscall.h>
    4040
    4141#define __syscall0      __syscall
  • uspace/lib/c/arch/sparc64/include/types.h

    r0f963cb ree24574  
    5353typedef int64_t intptr_t;
    5454typedef uint64_t uintptr_t;
     55typedef int64_t intptr_t;
    5556typedef uint64_t atomic_count_t;
    5657typedef int64_t atomic_signed_t;
  • uspace/lib/c/arch/sparc64/src/fibril.S

    r0f963cb ree24574  
    2727#
    2828
    29 #include <kernel/arch/context_offset.h>
     29#include <libarch/context_offset.h>
    3030
    31 .text   
     31.text
    3232
    3333.global context_save
  • uspace/lib/c/generic/async.c

    r0f963cb ree24574  
    107107#include <errno.h>
    108108#include <sys/time.h>
    109 #include <arch/barrier.h>
     109#include <libarch/barrier.h>
    110110#include <bool.h>
    111111#include <malloc.h>
  • uspace/lib/c/generic/ddi.c

    r0f963cb ree24574  
    3131 */
    3232/** @file
    33  */ 
     33 */
    3434
     35#include <sys/types.h>
     36#include <abi/ddi/arg.h>
    3537#include <ddi.h>
    3638#include <libarch/ddi.h>
     
    4042#include <align.h>
    4143#include <libarch/config.h>
    42 #include <kernel/ddi/ddi_arg.h>
    4344
    4445/** Return unique device number.
  • uspace/lib/c/generic/event.c

    r0f963cb ree24574  
    3939#include <libc.h>
    4040#include <event.h>
    41 #include <kernel/ipc/event_types.h>
    4241
    4342/** Subscribe event notifications.
  • uspace/lib/c/generic/fibril.c

    r0f963cb ree24574  
    4141#include <unistd.h>
    4242#include <stdio.h>
    43 #include <arch/barrier.h>
     43#include <libarch/barrier.h>
    4444#include <libarch/faddr.h>
    4545#include <futex.h>
  • uspace/lib/c/generic/io/io.c

    r0f963cb ree24574  
    4545#include <vfs/vfs.h>
    4646#include <vfs/vfs_sess.h>
    47 #include <ipc/devmap.h>
     47#include <ipc/loc.h>
    4848#include <adt/list.h>
    4949#include "../private/io.h"
  • uspace/lib/c/generic/ns_obsolete.c

    r0f963cb ree24574  
    3636#include <async_obsolete.h>
    3737#include <ns_obsolete.h>
    38 #include <kernel/ipc/ipc_methods.h>
     38#include <abi/ipc/methods.h>
    3939
    4040int service_obsolete_connect(sysarg_t service, sysarg_t arg2, sysarg_t arg3)
  • uspace/lib/c/generic/private/thread.h

    r0f963cb ree24574  
    3636#define LIBC_PRIVATE_THREAD_H_
    3737
    38 #include <kernel/proc/uarg.h>
     38#include <abi/proc/uarg.h>
    3939
    4040extern void __thread_entry(void);
  • uspace/lib/c/generic/thread.c

    r0f963cb ree24574  
    3737#include <stdlib.h>
    3838#include <libarch/faddr.h>
    39 #include <kernel/proc/uarg.h>
     39#include <abi/proc/uarg.h>
    4040#include <fibril.h>
    4141#include <str.h>
  • uspace/lib/c/generic/time.c

    r0f963cb ree24574  
    3636#include <time.h>
    3737#include <bool.h>
    38 #include <arch/barrier.h>
     38#include <libarch/barrier.h>
    3939#include <macros.h>
    4040#include <errno.h>
  • uspace/lib/c/generic/udebug.c

    r0f963cb ree24574  
    3535#include <udebug.h>
    3636#include <sys/types.h>
    37 #include <kernel/ipc/ipc_methods.h>
     37#include <abi/ipc/methods.h>
    3838#include <async.h>
    3939
  • uspace/lib/c/generic/vfs/vfs.c

    r0f963cb ree24574  
    5151#include <assert.h>
    5252#include <str.h>
    53 #include <devmap.h>
     53#include <loc.h>
    5454#include <ipc/vfs.h>
    55 #include <ipc/devmap.h>
     55#include <ipc/loc.h>
    5656
    5757static FIBRIL_MUTEX_INITIALIZE(vfs_mutex);
     
    142142}
    143143
    144 int mount(const char *fs_name, const char *mp, const char *fqdn,
     144int mount(const char *fs_name, const char *mp, const char *fqsn,
    145145    const char *opts, unsigned int flags)
    146146{
    147147        int null_id = -1;
    148         char null[DEVMAP_NAME_MAXLEN];
    149        
    150         if (str_cmp(fqdn, "") == 0) {
     148        char null[LOC_NAME_MAXLEN];
     149       
     150        if (str_cmp(fqsn, "") == 0) {
    151151                /* No device specified, create a fresh
    152152                   null/%d device instead */
    153                 null_id = devmap_null_create();
     153                null_id = loc_null_create();
    154154               
    155155                if (null_id == -1)
    156156                        return ENOMEM;
    157157               
    158                 snprintf(null, DEVMAP_NAME_MAXLEN, "null/%d", null_id);
    159                 fqdn = null;
    160         }
    161        
    162         devmap_handle_t devmap_handle;
    163         int res = devmap_device_get_handle(fqdn, &devmap_handle, flags);
     158                snprintf(null, LOC_NAME_MAXLEN, "null/%d", null_id);
     159                fqsn = null;
     160        }
     161       
     162        service_id_t service_id;
     163        int res = loc_service_get_id(fqsn, &service_id, flags);
    164164        if (res != EOK) {
    165165                if (null_id != -1)
    166                         devmap_null_destroy(null_id);
     166                        loc_null_destroy(null_id);
    167167               
    168168                return res;
     
    173173        if (!mpa) {
    174174                if (null_id != -1)
    175                         devmap_null_destroy(null_id);
     175                        loc_null_destroy(null_id);
    176176               
    177177                return ENOMEM;
     
    181181
    182182        sysarg_t rc_orig;
    183         aid_t req = async_send_2(exch, VFS_IN_MOUNT, devmap_handle, flags, NULL);
     183        aid_t req = async_send_2(exch, VFS_IN_MOUNT, service_id, flags, NULL);
    184184        sysarg_t rc = async_data_write_start(exch, (void *) mpa, mpa_size);
    185185        if (rc != EOK) {
     
    189189               
    190190                if (null_id != -1)
    191                         devmap_null_destroy(null_id);
     191                        loc_null_destroy(null_id);
    192192               
    193193                if (rc_orig == EOK)
     
    204204               
    205205                if (null_id != -1)
    206                         devmap_null_destroy(null_id);
     206                        loc_null_destroy(null_id);
    207207               
    208208                if (rc_orig == EOK)
     
    219219               
    220220                if (null_id != -1)
    221                         devmap_null_destroy(null_id);
     221                        loc_null_destroy(null_id);
    222222               
    223223                if (rc_orig == EOK)
     
    235235               
    236236                if (null_id != -1)
    237                         devmap_null_destroy(null_id);
     237                        loc_null_destroy(null_id);
    238238               
    239239                if (rc_orig == EOK)
     
    248248       
    249249        if ((rc != EOK) && (null_id != -1))
    250                 devmap_null_destroy(null_id);
     250                loc_null_destroy(null_id);
    251251       
    252252        return (int) rc;
     
    335335        ipc_call_t answer;
    336336        aid_t req = async_send_4(exch, VFS_IN_OPEN_NODE, node->fs_handle,
    337             node->devmap_handle, node->index, oflag, &answer);
     337            node->service_id, node->index, oflag, &answer);
    338338       
    339339        vfs_exchange_end(exch);
     
    811811        }
    812812       
    813         if (!stat.device) {
     813        if (!stat.service) {
    814814                errno = ENOENT;
    815815                return NULL;
    816816        }
    817817       
    818         return devmap_device_connect(mgmt, stat.device, 0);
     818        return loc_service_connect(mgmt, stat.service, 0);
    819819}
    820820
     
    826826        if (rc == EOK) {
    827827                node->fs_handle = stat.fs_handle;
    828                 node->devmap_handle = stat.devmap_handle;
     828                node->service_id = stat.service_id;
    829829                node->index = stat.index;
    830830        }
  • uspace/lib/c/include/as.h

    r0f963cb ree24574  
    3737
    3838#include <sys/types.h>
     39#include <abi/mm/as.h>
    3940#include <task.h>
    40 #include <kernel/mm/as.h>
    4141#include <libarch/config.h>
    4242
  • uspace/lib/c/include/ddi.h

    r0f963cb ree24574  
    3737
    3838#include <sys/types.h>
    39 #include <kernel/ddi/irq.h>
     39#include <abi/ddi/irq.h>
    4040#include <task.h>
    4141
  • uspace/lib/c/include/elf/elf.h

    r0f963cb ree24574  
    3636#define LIBC_ELF_H_
    3737
    38 #include <kernel/lib/elf.h>
     38#include <sys/types.h>
     39#include <abi/elf.h>
     40#include <libarch/elf.h>
    3941
    4042#endif
  • uspace/lib/c/include/elf/elf_load.h

    r0f963cb ree24574  
    3838#define ELF_LOAD_H_
    3939
    40 #include <arch/elf.h>
    4140#include <elf/elf.h>
    4241#include <sys/types.h>
     
    4847#define EE_OK                   0       /* No error */
    4948#define EE_INVALID              1       /* Invalid ELF image */
    50 #define EE_MEMORY               2       /* Cannot allocate address space */
     49#define EE_MEMORY               2       /* Cannot allocate address space */
    5150#define EE_INCOMPATIBLE         3       /* ELF image is not compatible with current architecture */
    5251#define EE_UNSUPPORTED          4       /* Non-supported ELF (e.g. dynamic ELFs) */
  • uspace/lib/c/include/errno.h

    r0f963cb ree24574  
    3636#define LIBC_ERRNO_H_
    3737
    38 #include <kernel/errno.h>
     38#include <abi/errno.h>
    3939#include <fibril.h>
    4040
  • uspace/lib/c/include/event.h

    r0f963cb ree24574  
    3636#define LIBC_EVENT_H_
    3737
    38 #include <kernel/ipc/event_types.h>
     38#include <abi/ipc/event.h>
    3939
    4040extern int event_subscribe(event_type_t, sysarg_t);
  • uspace/lib/c/include/ipc/common.h

    r0f963cb ree24574  
    3737
    3838#include <sys/types.h>
     39#include <abi/ipc/ipc.h>
    3940#include <atomic.h>
    40 #include <kernel/ipc/ipc.h>
    4141
    4242#define IPC_FLAG_BLOCKING  0x01
  • uspace/lib/c/include/ipc/devman.h

    r0f963cb ree24574  
    130130        DEVMAN_CLIENT,
    131131        DEVMAN_CONNECT_TO_DEVICE,
    132         DEVMAN_CONNECT_FROM_DEVMAP,
     132        DEVMAN_CONNECT_FROM_LOC,
    133133        DEVMAN_CONNECT_TO_PARENTS_DEVICE
    134134} devman_interface_t;
  • uspace/lib/c/include/ipc/fb.h

    r0f963cb ree24574  
    5555        FB_DRAW_TEXT_DATA,
    5656        FB_FLUSH,
    57         FB_DRAW_PPM,
     57        FB_DRAW_IMGMAP,
    5858        FB_PREPARE_SHM,
    5959        FB_DROP_SHM,
    60         FB_SHM2PIXMAP,
    61         FB_VP_DRAW_PIXMAP,
    62         FB_VP2PIXMAP,
    63         FB_DROP_PIXMAP,
     60        FB_SHM2IMGMAP,
     61        FB_VP_DRAW_IMGMAP,
     62        FB_VP2IMGMAP,
     63        FB_DROP_IMGMAP,
    6464        FB_ANIM_CREATE,
    6565        FB_ANIM_DROP,
    66         FB_ANIM_ADDPIXMAP,
     66        FB_ANIM_ADDIMGMAP,
    6767        FB_ANIM_CHGVP,
    6868        FB_ANIM_START,
  • uspace/lib/c/include/ipc/ipc.h

    r0f963cb ree24574  
    4242#include <sys/types.h>
    4343#include <ipc/common.h>
    44 #include <kernel/ipc/ipc_methods.h>
    45 #include <kernel/synch/synch.h>
     44#include <abi/ipc/methods.h>
     45#include <abi/synch.h>
    4646#include <task.h>
    4747
  • uspace/lib/c/include/ipc/loc.h

    r0f963cb ree24574  
    11/*
    22 * Copyright (c) 2007 Josef Cejka
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    2728 */
    2829
    29 /** @addtogroup devmap
     30/** @addtogroup loc
    3031 * @{
    3132 */
    3233
    33 #ifndef LIBC_IPC_DEVMAP_H_
    34 #define LIBC_IPC_DEVMAP_H_
     34#ifndef LIBC_IPC_LOC_H_
     35#define LIBC_IPC_LOC_H_
    3536
    3637#include <ipc/common.h>
    3738
    38 #define DEVMAP_NAME_MAXLEN  255
     39#define LOC_NAME_MAXLEN  255
    3940
    40 typedef sysarg_t devmap_handle_t;
     41typedef sysarg_t service_id_t;
     42typedef sysarg_t category_id_t;
    4143
    4244typedef enum {
    43         DEV_HANDLE_NONE,
    44         DEV_HANDLE_NAMESPACE,
    45         DEV_HANDLE_DEVICE
    46 } devmap_handle_type_t;
     45        LOC_OBJECT_NONE,
     46        LOC_OBJECT_NAMESPACE,
     47        LOC_OBJECT_SERVICE
     48} loc_object_type_t;
    4749
    4850typedef enum {
    49         DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
    50         DEVMAP_DRIVER_UNREGISTER,
    51         DEVMAP_DEVICE_REGISTER,
    52         DEVMAP_DEVICE_UNREGISTER,
    53         DEVMAP_DEVICE_GET_HANDLE,
    54         DEVMAP_NAMESPACE_GET_HANDLE,
    55         DEVMAP_HANDLE_PROBE,
    56         DEVMAP_NULL_CREATE,
    57         DEVMAP_NULL_DESTROY,
    58         DEVMAP_GET_NAMESPACE_COUNT,
    59         DEVMAP_GET_DEVICE_COUNT,
    60         DEVMAP_GET_NAMESPACES,
    61         DEVMAP_GET_DEVICES
    62 } devmap_request_t;
     51        LOC_SERVER_REGISTER = IPC_FIRST_USER_METHOD,
     52        LOC_SERVER_UNREGISTER,
     53        LOC_SERVICE_ADD_TO_CAT,
     54        LOC_SERVICE_REGISTER,
     55        LOC_SERVICE_UNREGISTER,
     56        LOC_SERVICE_GET_ID,
     57        LOC_SERVICE_GET_NAME,
     58        LOC_NAMESPACE_GET_ID,
     59        LOC_CATEGORY_GET_ID,
     60        LOC_CATEGORY_GET_SVCS,
     61        LOC_ID_PROBE,
     62        LOC_NULL_CREATE,
     63        LOC_NULL_DESTROY,
     64        LOC_GET_NAMESPACE_COUNT,
     65        LOC_GET_SERVICE_COUNT,
     66        LOC_GET_CATEGORIES,
     67        LOC_GET_NAMESPACES,
     68        LOC_GET_SERVICES
     69} loc_request_t;
    6370
    64 /** Interface provided by devmap.
     71/** Ports provided by location service.
    6572 *
    66  * Every process that connects to devmap must ask one of following
    67  * interfaces otherwise connection will be refused.
     73 * Every process that connects to loc must ask one of following
     74 * ports, otherwise connection will be refused.
    6875 *
    6976 */
    7077typedef enum {
    71         /** Connect as device driver */
    72         DEVMAP_DRIVER = 1,
    73         /** Connect as client */
    74         DEVMAP_CLIENT,
     78        /** Service supplier (server) port */
     79        LOC_PORT_SUPPLIER = 1,
     80        /** Service consumer (client) port */
     81        LOC_PORT_CONSUMER,
    7582        /** Create new connection to instance of device that
    7683            is specified by second argument of call. */
    77         DEVMAP_CONNECT_TO_DEVICE
    78 } devmap_interface_t;
     84        LOC_CONNECT_TO_SERVICE
     85} loc_interface_t;
    7986
    8087typedef struct {
    81         devmap_handle_t handle;
    82         char name[DEVMAP_NAME_MAXLEN + 1];
    83 } dev_desc_t;
     88        service_id_t id;
     89        char name[LOC_NAME_MAXLEN + 1];
     90} loc_sdesc_t;
    8491
    8592#endif
  • uspace/lib/c/include/ipc/services.h

    r0f963cb ree24574  
    4545        SERVICE_VIDEO      = FOURCC('v', 'i', 'd', ' '),
    4646        SERVICE_VFS        = FOURCC('v', 'f', 's', ' '),
    47         SERVICE_DEVMAP     = FOURCC('d', 'e', 'v', 'p'),
     47        SERVICE_LOC        = FOURCC('l', 'o', 'c', ' '),
    4848        SERVICE_DEVMAN     = FOURCC('d', 'e', 'v', 'n'),
    4949        SERVICE_IRC        = FOURCC('i', 'r', 'c', ' '),
  • uspace/lib/c/include/libc.h

    r0f963cb ree24574  
    3737
    3838#include <sys/types.h>
    39 #include <kernel/syscall/syscall.h>
     39#include <abi/syscall.h>
    4040#include <libarch/syscall.h>
    4141
  • uspace/lib/c/include/loc.h

    r0f963cb ree24574  
    3333 */
    3434
    35 #ifndef LIBC_DEVMAP_H_
    36 #define LIBC_DEVMAP_H_
     35#ifndef LIBC_LOC_H_
     36#define LIBC_LOC_H_
    3737
    38 #include <ipc/devmap.h>
     38#include <ipc/loc.h>
    3939#include <async.h>
    4040#include <bool.h>
    4141
    42 extern async_exch_t *devmap_exchange_begin_blocking(devmap_interface_t);
    43 extern async_exch_t *devmap_exchange_begin(devmap_interface_t);
    44 extern void devmap_exchange_end(async_exch_t *);
     42extern async_exch_t *loc_exchange_begin_blocking(loc_interface_t);
     43extern async_exch_t *loc_exchange_begin(loc_interface_t);
     44extern void loc_exchange_end(async_exch_t *);
    4545
    46 extern int devmap_driver_register(const char *, async_client_conn_t);
    47 extern int devmap_device_register(const char *, devmap_handle_t *);
    48 extern int devmap_device_register_with_iface(const char *, devmap_handle_t *,
     46extern int loc_server_register(const char *, async_client_conn_t);
     47extern int loc_service_register(const char *, service_id_t *);
     48extern int loc_service_register_with_iface(const char *, service_id_t *,
    4949    sysarg_t);
     50extern int loc_service_add_to_cat(service_id_t, category_id_t);
    5051
    51 extern int devmap_device_get_handle(const char *, devmap_handle_t *,
     52extern int loc_service_get_id(const char *, service_id_t *,
    5253    unsigned int);
    53 extern int devmap_namespace_get_handle(const char *, devmap_handle_t *,
     54extern int loc_service_get_name(service_id_t, char **);
     55extern int loc_namespace_get_id(const char *, service_id_t *,
    5456    unsigned int);
    55 extern devmap_handle_type_t devmap_handle_probe(devmap_handle_t);
     57extern int loc_category_get_id(const char *, category_id_t *,
     58    unsigned int);
     59extern int loc_category_get_name(category_id_t, char **);
     60extern int loc_category_get_svcs(category_id_t, category_id_t **, size_t *);
     61extern loc_object_type_t loc_id_probe(service_id_t);
    5662
    57 extern async_sess_t *devmap_device_connect(exch_mgmt_t, devmap_handle_t,
     63extern async_sess_t *loc_service_connect(exch_mgmt_t, service_id_t,
    5864    unsigned int);
    5965
    60 extern int devmap_null_create(void);
    61 extern void devmap_null_destroy(int);
     66extern int loc_null_create(void);
     67extern void loc_null_destroy(int);
    6268
    63 extern size_t devmap_count_namespaces(void);
    64 extern size_t devmap_count_devices(devmap_handle_t);
     69extern size_t loc_count_namespaces(void);
     70extern size_t loc_count_services(service_id_t);
    6571
    66 extern size_t devmap_get_namespaces(dev_desc_t **);
    67 extern size_t devmap_get_devices(devmap_handle_t, dev_desc_t **);
     72extern size_t loc_get_namespaces(loc_sdesc_t **);
     73extern size_t loc_get_services(service_id_t, loc_sdesc_t **);
     74extern int loc_get_categories(category_id_t **, size_t *);
     75
    6876
    6977#endif
  • uspace/lib/c/include/rtld/elf_dyn.h

    r0f963cb ree24574  
    3636#define LIBC_RTLD_ELF_DYN_H_
    3737
    38 #include <arch/elf.h>
    3938#include <sys/types.h>
    40 
    4139#include <elf/elf.h>
    4240#include <libarch/rtld/elf_dyn.h>
  • uspace/lib/c/include/stats.h

    r0f963cb ree24574  
    4040#include <stdint.h>
    4141#include <bool.h>
    42 #include <kernel/sysinfo/abi.h>
     42#include <sys/types.h>
     43#include <abi/sysinfo.h>
    4344
    4445extern stats_cpu_t *stats_get_cpus(size_t *);
  • uspace/lib/c/include/sys/stat.h

    r0f963cb ree24574  
    3939#include <bool.h>
    4040#include <ipc/vfs.h>
    41 #include <ipc/devmap.h>
     41#include <ipc/loc.h>
    4242
    4343struct stat {
    4444        fs_handle_t fs_handle;
    45         devmap_handle_t devmap_handle;
     45        service_id_t service_id;
    4646        fs_index_t index;
    4747        unsigned int lnkcnt;
     
    4949        bool is_directory;
    5050        aoff64_t size;
    51         devmap_handle_t device;
     51        service_id_t service;
    5252};
    5353
  • uspace/lib/c/include/syscall.h

    r0f963cb ree24574  
    4545
    4646#include <sys/types.h>
    47 #include <kernel/syscall/syscall.h>
     47#include <abi/syscall.h>
    4848
    4949#define __syscall0  __syscall
  • uspace/lib/c/include/udebug.h

    r0f963cb ree24574  
    3636#define LIBC_UDEBUG_H_
    3737
    38 #include <kernel/udebug/udebug.h>
     38#include <abi/udebug.h>
    3939#include <sys/types.h>
    4040#include <async.h>
  • uspace/lib/c/include/vfs/vfs.h

    r0f963cb ree24574  
    3838#include <sys/types.h>
    3939#include <ipc/vfs.h>
    40 #include <ipc/devmap.h>
     40#include <ipc/loc.h>
    4141#include <stdio.h>
    4242
     
    4949typedef struct {
    5050        fs_handle_t fs_handle;
    51         devmap_handle_t devmap_handle;
     51        service_id_t service_id;
    5252        fs_index_t index;
    5353} fdi_node_t;
Note: See TracChangeset for help on using the changeset viewer.