/trunk/uspace/libc/include/align.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ALIGN_H__ |
#define __ALIGN_H__ |
#ifndef LIBC_ALIGN_H_ |
#define LIBC_ALIGN_H_ |
/** Align to the nearest lower address. |
* |
52,8 → 52,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/futex.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__FUTEX_H__ |
#define __LIBC__FUTEX_H__ |
#ifndef LIBC_FUTEX_H_ |
#define LIBC_FUTEX_H_ |
#include <atomic.h> |
#include <types.h> |
48,8 → 48,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/endian.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ENDIAN_H__ |
#define __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
#define LIBC_ENDIAN_H_ |
#define __LITTLE_ENDIAN 1234 |
#define __BIG_ENDIAN 4321 |
43,9 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/ddi.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC_DDI_H__ |
#define __LIBC_DDI_H__ |
#ifndef LIBC_DDI_H_ |
#define LIBC_DDI_H_ |
#include <task.h> |
43,8 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__LIMITS_H__ |
#define __LIBC__LIMITS_H__ |
#ifndef LIBC_LIMITS_H_ |
#define LIBC_LIMITS_H_ |
#include <stdint.h> |
#include <libarch/limits.h> |
70,9 → 70,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/as.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __libc_AS_H__ |
#define __libc_AS_H__ |
#ifndef LIBC_AS_H_ |
#define LIBC_AS_H_ |
#include <types.h> |
#include <task.h> |
50,8 → 50,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/stdint.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__STDINT_H__ |
#define __LIBC__STDINT_H__ |
#ifndef LIBC_STDINT_H_ |
#define LIBC_STDINT_H_ |
/* Definitions of types with fixed size*/ |
#include <types.h> |
60,9 → 60,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/string.h |
---|
32,10 → 32,9 |
/** @file |
*/ |
#ifndef LIBC_STRING_H_ |
#define LIBC_STRING_H_ |
#ifndef __LIBC__STRING_H__ |
#define __LIBC__STRING_H__ |
#include <types.h> |
#define bzero(ptr, len) memset((ptr), 0, (len)) |
59,8 → 58,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/stddef.h |
---|
32,16 → 32,12 |
/** @file |
*/ |
#ifndef __LIBC__STDDEF_H__ |
#define __LIBC__STDDEF_H__ |
#ifndef LIBC_STDDEF_H_ |
#define LIBC_STDDEF_H_ |
#include <types.h> |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/psthread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__PSTHREAD_H__ |
#define __LIBC__PSTHREAD_H__ |
#ifndef LIBC_PSTHREAD_H_ |
#define LIBC_PSTHREAD_H_ |
#include <libarch/psthread.h> |
#include <libadt/list.h> |
94,8 → 94,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/async.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef _libc_ASYNC_H_ |
#define _libc_ASYNC_H_ |
#ifndef LIBC_ASYNC_H_ |
#define LIBC_ASYNC_H_ |
#include <ipc/ipc.h> |
#include <psthread.h> |
130,8 → 130,5 |
extern atomic_t async_futex; |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/stdlib.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__STDLIB_H__ |
#define __LIBC__STDLIB_H__ |
#ifndef LIBC_STDLIB_H_ |
#define LIBC_STDLIB_H_ |
#include <unistd.h> |
#include <malloc.h> |
55,11 → 55,7 |
srandom(seed); |
} |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/stdio.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__STDIO_H__ |
#define __LIBC__STDIO_H__ |
#ifndef LIBC_STDIO_H_ |
#define LIBC_STDIO_H_ |
#include <types.h> |
#include <stdarg.h> |
59,8 → 59,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/err.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef _libc__ERR_H_ |
#define _libc__ERR_H_ |
#ifndef LIBC_ERR_H_ |
#define LIBC_ERR_H_ |
#define errx(status, fmt, ...) { \ |
printf((fmt), ##__VA_ARGS__); \ |
42,6 → 42,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/sysinfo.h |
---|
32,10 → 32,9 |
/** @file |
*/ |
#ifndef __LIBC_SYSINFO_H__ |
#define __LIBC_SYSINFO_H__ |
#ifndef LIBC_SYSINFO_H_ |
#define LIBC_SYSINFO_H_ |
#include <libc.h> |
#include <sysinfo.h> |
#include <string.h> |
44,9 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/time.h |
---|
32,13 → 32,10 |
/** @file |
*/ |
#ifndef __libc_TIME_H__ |
#define __libc_TIME_H__ |
#ifndef LIBC_TIME_H_ |
#define LIBC_TIME_H_ |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/assert.h |
---|
33,8 → 33,8 |
/** @file |
*/ |
#ifndef __LIBC__ASSERT_H__ |
#define __LIBC__ASSERT_H__ |
#ifndef LIBC_ASSERT_H_ |
#define LIBC_ASSERT_H_ |
/** Debugging assert macro |
* |
55,8 → 55,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/task.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__TASK_H__ |
#define __LIBC__TASK_H__ |
#ifndef LIBC_TASK_H_ |
#define LIBC_TASK_H_ |
#include <types.h> |
43,8 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/cap.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __CAP_H__ |
#define __CAP_H__ |
#ifndef LIB_CAP_H_ |
#define LIB_CAP_H_ |
#include <task.h> |
42,8 → 42,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/unistd.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__UNISTD_H__ |
#define __LIBC__UNISTD_H__ |
#ifndef LIBC_UNISTD_H_ |
#define LIBC_UNISTD_H_ |
#include <types.h> |
#include <libarch/config.h> |
51,5 → 51,3 |
/** @} |
*/ |
/trunk/uspace/libc/include/thread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__THREAD_H__ |
#define __LIBC__THREAD_H__ |
#ifndef LIBC_THREAD_H_ |
#define LIBC_THREAD_H_ |
#include <kernel/proc/uarg.h> |
#include <libarch/thread.h> |
51,8 → 51,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/libadt/hash_table.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __HASH_TABLE_H__ |
#define __HASH_TABLE_H__ |
#ifndef LIBC_HASH_TABLE_H_ |
#define LIBC_HASH_TABLE_H_ |
#include <libadt/list.h> |
#include <unistd.h> |
85,8 → 85,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/libadt/list.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIST_H__ |
#define __LIST_H__ |
#ifndef LIBC_LIST_H_ |
#define LIBC_LIST_H_ |
#include<unistd.h> |
190,8 → 190,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/libadt/fifo.h |
---|
42,8 → 42,8 |
* and use'. |
*/ |
#ifndef __FIFO_H__ |
#define __FIFO_H__ |
#ifndef LIBC_FIFO_H_ |
#define LIBC_FIFO_H_ |
#include <malloc.h> |
123,8 → 123,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/libc.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__LIBC_H__ |
#define __LIBC__LIBC_H__ |
#ifndef LIBC_LIBC_H_ |
#define LIBC_LIBC_H_ |
#include <types.h> |
#include <kernel/syscall/syscall.h> |
/trunk/uspace/libc/include/atomic.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ATOMIC_H__ |
#define __ATOMIC_H__ |
#ifndef LIBC_ATOMIC_H_ |
#define LIBC_ATOMIC_H_ |
typedef struct atomic { |
volatile long count; |
53,8 → 53,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/io/printf_core.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__PRINTF_CORE_H__ |
#define __LIBC__PRINTF_CORE_H__ |
#ifndef LIBC_PRINTF_CORE_H_ |
#define LIBC_PRINTF_CORE_H_ |
#include <libarch/types.h> |
#include <stdarg.h> |
51,7 → 51,6 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/io/stream.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __libc_STREAM_H_ |
#define __libc_STREAM_H_ |
#ifndef LIBC_STREAM_H_ |
#define LIBC_STREAM_H_ |
#include <libarch/types.h> |
41,7 → 41,6 |
typedef int fd_t; |
typedef ssize_t (*pwritefn_t)(void *, const void *, size_t); |
typedef ssize_t (*preadfn_t)(void *, void *, size_t); |
50,8 → 49,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/io/io.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__IO_H__ |
#define __LIBC__IO_H__ |
#ifndef LIBC_IO_H_ |
#define LIBC_IO_H_ |
#include <libarch/types.h> |
44,7 → 44,6 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/stdarg.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__STDARG_H__ |
#define __LIBC__STDARG_H__ |
#ifndef LIBC_STDARG_H_ |
#define LIBC_STDARG_H_ |
#include <types.h> |
#include <libarch/stackarg.h> |
51,9 → 51,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/ctype.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __CTYPE_H__ |
#define __CTYPE_H__ |
#ifndef LIBC_CTYPE_H_ |
#define LIBC_CTYPE_H_ |
static inline int isdigit(int c) |
{ |
58,9 → 58,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/errno.h |
---|
32,17 → 32,12 |
/** @file |
*/ |
#ifndef __LIBC__ERRNO_H__ |
#define __LIBC__ERRNO_H__ |
#ifndef LIBC_ERRNO_H_ |
#define LIBC_ERRNO_H_ |
#include <kernel/errno.h> |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/ipc/ipc.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBIPC_IPC_H__ |
#define __LIBIPC_IPC_H__ |
#ifndef LIBIPC_IPC_H_ |
#define LIBIPC_IPC_H_ |
#include <kernel/ipc/ipc.h> |
#include <kernel/ipc/irq.h> |
89,8 → 89,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/ipc/ns.h |
---|
32,13 → 32,10 |
/** @file |
*/ |
#ifndef __LIBIPC__NS_H__ |
#define __LIBIPC__NS_H__ |
#ifndef LIBIPC_NS_H_ |
#define LIBIPC_NS_H_ |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/ipc/services.h |
---|
34,8 → 34,8 |
* @brief List of all known services and their codes. |
*/ |
#ifndef __LIBIPC__SERVICES_H__ |
#define __LIBIPC__SERVICES_H__ |
#ifndef LIBIPC_SERVICES_H_ |
#define LIBIPC_SERVICES_H_ |
#define SERVICE_PCI 1 |
#define SERVICE_KEYBOARD 2 |
48,8 → 48,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/sys/mman.h |
---|
File deleted |
/trunk/uspace/libc/include/sys/mmap.h |
---|
0,0 → 1,58 |
/* |
* Copyright (C) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_MMAP_H_ |
#define LIBC_MMAP_H_ |
#include <as.h> |
#define MAP_FAILED ((void *) -1) |
#define MAP_SHARED (1 << 0) |
#define MAP_PRIVATE (1 << 1) |
#define MAP_FIXED (1 << 2) |
#define MAP_ANONYMOUS (1 << 3) |
#define PROTO_READ AS_AREA_READ |
#define PROTO_WRITE AS_AREA_WRITE |
#define PROTO_EXEC AS_AREA_EXEC |
extern void *mmap(void *start, size_t length, int prot, int flags, int fd, |
off_t offset); |
extern int munmap(void *start, size_t length); |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/sys/time.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __libc_sys_TIME_H__ |
#define __libc_sys_TIME_H__ |
#ifndef LIBC_TIME_H_ |
#define LIBC_TIME_H_ |
#include <types.h> |
56,8 → 56,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/include/sys/types.h |
---|
41,5 → 41,3 |
/** @} |
*/ |
/trunk/uspace/libc/malloc/malloc.c |
---|
565,7 → 565,7 |
#endif /* USE_BUILTIN_FFS */ |
#if HAVE_MMAP |
#ifndef LACKS_SYS_MMAN_H |
#include <sys/mman.h> /* for mmap */ |
#include <sys/mmap.h> /* for mmap */ |
#endif /* LACKS_SYS_MMAN_H */ |
#ifndef LACKS_FCNTL_H |
#include <fcntl.h> |
/trunk/uspace/libc/generic/time.c |
---|
114,6 → 114,5 |
futex_down_timeout(&futex, usec, 0); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/ddi.c |
---|
87,6 → 87,5 |
return __SYSCALL1(SYS_PREEMPT_CONTROL, (sysarg_t) enable); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/task.c |
---|
44,8 → 44,5 |
return task_id; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/cap.c |
---|
71,6 → 71,5 |
return __SYSCALL2(SYS_CAP_REVOKE, (sysarg_t) &arg, (sysarg_t) caps); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/string.c |
---|
314,6 → 314,5 |
return orig; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/thread.c |
---|
154,5 → 154,3 |
/** @} |
*/ |
/trunk/uspace/libc/generic/psthread.c |
---|
305,6 → 305,5 |
serialization_count--; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/ipc.c |
---|
464,9 → 464,5 |
return __SYSCALL4(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/async.c |
---|
807,6 → 807,5 |
ipc_call_async_2(phoneid, method, arg1, arg2, NULL, NULL, !in_interrupt_handler); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/libadt/hash_table.c |
---|
175,8 → 175,5 |
} |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/libadt/list.c |
---|
85,8 → 85,5 |
list_initialize(head2); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/stdlib.c |
---|
46,8 → 46,5 |
glbl_seed = seed; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/printf.c |
---|
54,10 → 54,6 |
return ret; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/snprintf.c |
---|
55,8 → 55,5 |
return ret; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/sprintf.c |
---|
54,8 → 54,5 |
return ret; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/io.c |
---|
109,10 → 109,5 |
return EOF; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/vprintf.c |
---|
56,10 → 56,5 |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/vsnprintf.c |
---|
37,7 → 37,6 |
#include <string.h> |
#include <io/printf_core.h> |
struct vsnprintf_data { |
size_t size; /* total space for string */ |
size_t len; /* count of currently used characters */ |
108,10 → 107,5 |
return printf_core(fmt, &ps, ap); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/printf_core.c |
---|
688,9 → 688,5 |
return -counter; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/stream.c |
---|
33,7 → 33,6 |
/** @file |
*/ |
#include <io/io.h> |
#include <io/stream.h> |
#include <string.h> |
88,7 → 87,6 |
return count; |
} |
static stream_t open_stdin(void) |
{ |
stream_t stream; |
130,7 → 128,6 |
return count; |
} |
fd_t open(const char *fname, int flags) |
{ |
int c = 0; |
190,6 → 187,5 |
return streams[fd].phone; |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/io/vsprintf.c |
---|
47,9 → 47,5 |
return vsnprintf(str, (size_t)-1, fmt, ap); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/err.c |
---|
42,6 → 42,5 |
} |
*/ |
/** @} |
*/ |
/trunk/uspace/libc/generic/sysinfo.c |
---|
41,8 → 41,6 |
return __SYSCALL2(SYS_SYSINFO_VALUE, (sysarg_t ) name, (sysarg_t) strlen(name) ); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/mmap.c |
---|
32,7 → 32,7 |
/** @file |
*/ |
#include <sys/mman.h> |
#include <sys/mmap.h> |
#include <as.h> |
#include <unistd.h> |
54,6 → 54,5 |
return as_area_destroy(start); |
} |
/** @} |
*/ |
/trunk/uspace/libc/generic/futex.c |
---|
173,8 → 173,5 |
return 0; |
} |
/** @} |
*/ |
/trunk/uspace/libc/arch/sparc64/include/context_offset.h |
---|
19,4 → 19,3 |
#define OFFSET_L6 0x80 |
#define OFFSET_L7 0x88 |
#define OFFSET_TP 0x90 |
/trunk/uspace/libc/arch/sparc64/include/endian.h |
---|
35,7 → 35,7 |
#ifndef LIBC_sparc64_ENDIAN_H_ |
#define LIBC_sparc64_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
/trunk/uspace/libc/arch/sparc64/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef LIBC_sparc64__LIMITS_H_ |
#define LIBC_sparc64__LIMITS_H_ |
#ifndef LIBC_sparc64_LIMITS_H_ |
#define LIBC_sparc64_LIMITS_H_ |
#define LONG_MIN MIN_INT64 |
#define LONG_MAX MAX_INT64 |
/trunk/uspace/libc/arch/ia64/include/psthread.h |
---|
137,4 → 137,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia64/include/atomic.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ia64_ATOMIC_H__ |
#define __ia64_ATOMIC_H__ |
#ifndef LIBC_ia64_ATOMIC_H_ |
#define LIBC_ia64_ATOMIC_H_ |
/** Atomic addition. |
* |
64,4 → 64,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia64/include/endian.h |
---|
32,10 → 32,10 |
/** @file |
*/ |
#ifndef __ia64_ENDIAN_H__ |
#define __ia64_ENDIAN_H__ |
#ifndef LIBC_ia64_ENDIAN_H_ |
#define LIBC_ia64_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
43,8 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia64/include/stackarg.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__STACKARG_H__ |
#define __LIBC__STACKARG_H__ |
#ifndef LIBC_STACKARG_H_ |
#define LIBC_STACKARG_H_ |
#endif |
/trunk/uspace/libc/arch/ia64/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ia64__LIMITS_H__ |
#define __ia64__LIMITS_H__ |
#ifndef LIBC_ia64_LIMITS_H_ |
#define LIBC_ia64_LIMITS_H_ |
# define LONG_MIN MIN_INT64 |
# define LONG_MAX MAX_INT64 |
42,9 → 42,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia64/include/stack.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ia64_STACK_H__ |
#define __ia64_STACK_H__ |
#ifndef LIBC_ia64_STACK_H_ |
#define LIBC_ia64_STACK_H_ |
#define STACK_ITEM_SIZE 8 |
#define STACK_ALIGNMENT 16 |
44,4 → 44,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia64/include/thread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ia64THREAD_H__ |
#define __LIBC__ia64THREAD_H__ |
#ifndef LIBC_ia64THREAD_H_ |
#define LIBC_ia64THREAD_H_ |
#define THREAD_INITIAL_STACK_PAGES_NO 2 |
61,4 → 61,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia64/src/thread.c |
---|
63,4 → 63,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32eb/include/endian.h |
---|
35,10 → 35,10 |
*/ |
#ifndef __mips32eb_ENDIAN_H__ |
#define __mips32eb_ENDIAN_H__ |
#ifndef LIBC_mips32eb_ENDIAN_H_ |
#define LIBC_mips32eb_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
48,4 → 48,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/context_offset.h |
---|
23,7 → 23,3 |
#define OFFSET_R31 0x54 |
#define OFFSET_CR 0x58 |
#define OFFSET_CR 0x58 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/psthread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ppc32__PSTHREAD_H__ |
#define __LIBC__ppc32__PSTHREAD_H__ |
#ifndef LIBC_ppc32_PSTHREAD_H_ |
#define LIBC_ppc32_PSTHREAD_H_ |
#include <types.h> |
81,4 → 81,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/atomic.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ppc32_ATOMIC_H__ |
#define __ppc32_ATOMIC_H__ |
#ifndef LIBC_ppc32_ATOMIC_H_ |
#define LIBC_ppc32_ATOMIC_H_ |
static inline void atomic_inc(atomic_t *val) |
{ |
93,4 → 93,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/endian.h |
---|
32,10 → 32,10 |
/** @file |
*/ |
#ifndef __ppc32_ENDIAN_H__ |
#define __ppc32_ENDIAN_H__ |
#ifndef LIBC_ppc32_ENDIAN_H_ |
#define LIBC_ppc32_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
45,4 → 45,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/regname.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ppc32_REGNAME_H__ |
#define __ppc32_REGNAME_H__ |
#ifndef LIBC_ppc32_REGNAME_H_ |
#define LIBC_ppc32_REGNAME_H_ |
/* Condition Register Bit Fields */ |
#define cr0 0 |
186,4 → 186,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/stackarg.h |
---|
32,12 → 32,10 |
/** @file |
*/ |
#ifndef __LIBC__STACKARG_H__ |
#define __LIBC__STACKARG_H__ |
#ifndef LIBC_STACKARG_H_ |
#define LIBC_STACKARG_H_ |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ppc32__LIMITS_H__ |
#define __ppc32__LIMITS_H__ |
#ifndef LIBC_ppc32_LIMITS_H_ |
#define LIBC_ppc32_LIMITS_H_ |
#define LONG_MIN MIN_INT32 |
#define LONG_MAX MAX_INT32 |
44,4 → 44,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/include/thread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ppc32__THREAD_H__ |
#define __LIBC__ppc32__THREAD_H__ |
#ifndef LIBC_ppc32_THREAD_H_ |
#define LIBC_ppc32_THREAD_H_ |
#define PPC_TP_OFFSET 0x7000 |
69,4 → 69,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/src/thread.c |
---|
57,4 → 57,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc32/src/syscall.c |
---|
59,4 → 59,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/amd64/include/psthread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__amd64PSTHREAD_H__ |
#define __LIBC__amd64PSTHREAD_H__ |
#ifndef LIBC_amd64_PSTHREAD_H_ |
#define LIBC_amd64_PSTHREAD_H_ |
#include <types.h> |
63,8 → 63,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/amd64/include/atomic.h |
---|
34,8 → 34,8 |
/** @file |
*/ |
#ifndef __amd64_ATOMIC_H__ |
#define __amd64_ATOMIC_H__ |
#ifndef LIBC_amd64_ATOMIC_H_ |
#define LIBC_amd64_ATOMIC_H_ |
static inline void atomic_inc(atomic_t *val) { |
__asm__ volatile ("lock incq %0\n" : "=m" (val->count)); |
76,8 → 76,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/amd64/include/endian.h |
---|
32,10 → 32,10 |
/** @file |
*/ |
#ifndef __amd64_ENDIAN_H__ |
#define __amd64_ENDIAN_H__ |
#ifndef LIBC_amd64_ENDIAN_H_ |
#define LIBC_amd64_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
43,8 → 43,6 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/amd64/include/stackarg.h |
---|
32,13 → 32,10 |
/** @file |
*/ |
#ifndef __LIBC__STACKARG_H__ |
#define __LIBC__STACKARG_H__ |
#ifndef LIBC_STACKARG_H_ |
#define LIBC_STACKARG_H_ |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/amd64/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __amd64__LIMITS_H__ |
#define __amd64__LIMITS_H__ |
#ifndef LIBC_amd64_LIMITS_H_ |
#define LIBC_amd64_LIMITS_H_ |
# define LONG_MIN MIN_INT64 |
# define LONG_MAX MAX_INT64 |
/trunk/uspace/libc/arch/amd64/include/types.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__TYPES_H__ |
#define __LIBC__TYPES_H__ |
#ifndef LIBC_amd64_TYPES_H_ |
#define LIBC_amd64_TYPES_H_ |
typedef unsigned long long sysarg_t; |
typedef unsigned long size_t; |
/trunk/uspace/libc/arch/amd64/include/thread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__amd64THREAD_H__ |
#define __LIBC__amd64THREAD_H__ |
#ifndef LIBC_amd64_THREAD_H_ |
#define LIBC_amd64_THREAD_H_ |
#include <libc.h> |
57,8 → 57,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/amd64/src/thread.c |
---|
60,8 → 60,5 |
free(start); |
} |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/context_offset.h |
---|
22,7 → 22,3 |
#define OFFSET_R30 0x50 |
#define OFFSET_R31 0x54 |
#define OFFSET_CR 0x58 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/psthread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ppc64__PSTHREAD_H__ |
#define __LIBC__ppc64__PSTHREAD_H__ |
#ifndef LIBC_ppc64_PSTHREAD_H_ |
#define LIBC_ppc64_PSTHREAD_H_ |
#include <types.h> |
81,4 → 81,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/atomic.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ppc64_ATOMIC_H__ |
#define __ppc64_ATOMIC_H__ |
#ifndef LIBC_ppc64_ATOMIC_H_ |
#define LIBC_ppc64_ATOMIC_H_ |
static inline void atomic_inc(atomic_t *val) |
{ |
93,4 → 93,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/endian.h |
---|
32,10 → 32,10 |
/** @file |
*/ |
#ifndef __ppc64_ENDIAN_H__ |
#define __ppc64_ENDIAN_H__ |
#ifndef LIBC_ppc64_ENDIAN_H_ |
#define LIBC_ppc64_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
45,4 → 45,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/regname.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ppc64_REGNAME_H__ |
#define __ppc64_REGNAME_H__ |
#ifndef LIBC_ppc64_REGNAME_H_ |
#define LIBC_ppc64_REGNAME_H_ |
/* Condition Register Bit Fields */ |
#define cr0 0 |
186,4 → 186,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/stackarg.h |
---|
32,12 → 32,10 |
/** @file |
*/ |
#ifndef __LIBC__STACKARG_H__ |
#define __LIBC__STACKARG_H__ |
#ifndef LIBC_STACKARG_H_ |
#define LIBC_STACKARG_H_ |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ppc64__LIMITS_H__ |
#define __ppc64__LIMITS_H__ |
#ifndef LIBC_ppc64_LIMITS_H_ |
#define LIBC_ppc64_LIMITS_H_ |
#define LONG_MIN MIN_INT64 |
#define LONG_MAX MAX_INT64 |
44,4 → 44,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/include/thread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ppc64__THREAD_H__ |
#define __LIBC__ppc64__THREAD_H__ |
#ifndef LIBC_ppc64_THREAD_H_ |
#define LIBC_ppc64_THREAD_H_ |
#define PPC_TP_OFFSET 0x7000 |
69,4 → 69,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/src/thread.c |
---|
58,4 → 58,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ppc64/src/syscall.c |
---|
59,4 → 59,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/context_offset.h |
---|
26,6 → 26,3 |
#define OFFSET_F29 0x58 |
#define OFFSET_F30 0x5c |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/psthread.h |
---|
33,8 → 33,8 |
* @ingroup libcmips32eb |
*/ |
#ifndef __LIBC__mips32PSTHREAD_H__ |
#define __LIBC__mips32PSTHREAD_H__ |
#ifndef LIBC_mips32_PSTHREAD_H_ |
#define LIBC_mips32_PSTHREAD_H_ |
#include <types.h> |
88,4 → 88,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/atomic.h |
---|
33,8 → 33,8 |
* @ingroup libcmips32eb |
*/ |
#ifndef __mips32_ATOMIC_H__ |
#define __mips32_ATOMIC_H__ |
#ifndef LIBC_mips32_ATOMIC_H_ |
#define LIBC_mips32_ATOMIC_H_ |
#define atomic_inc(x) ((void) atomic_add(x, 1)) |
#define atomic_dec(x) ((void) atomic_add(x, -1)) |
75,4 → 75,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/endian.h |
---|
34,10 → 34,10 |
/** @file |
*/ |
#ifndef __mips32_ENDIAN_H__ |
#define __mips32_ENDIAN_H__ |
#ifndef LIBC_mips32_ENDIAN_H_ |
#define LIBC_mips32_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
45,7 → 45,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/stackarg.h |
---|
33,8 → 33,8 |
* @ingroup libcmips32eb |
*/ |
#ifndef __LIBC_mips32_STACKARG_H__ |
#define __LIBC_mips32_STACKARG_H__ |
#ifndef LIBC_mips32_STACKARG_H_ |
#define LIBC_mips32_STACKARG_H_ |
/* dont allow to define it second time in stdarg.h */ |
#define __VARARGS_DEFINED |
60,4 → 60,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/limits.h |
---|
33,8 → 33,8 |
* @ingroup libcmips32eb |
*/ |
#ifndef __mips32__LIMITS_H__ |
#define __mips32__LIMITS_H__ |
#ifndef LIBC_mips32__LIMITS_H_ |
#define LIBC_mips32__LIMITS_H_ |
# define LONG_MIN MIN_INT32 |
# define LONG_MAX MAX_INT32 |
43,8 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/include/thread.h |
---|
35,8 → 35,8 |
/* TLS for MIPS is described in http://www.linux-mips.org/wiki/NPTL */ |
#ifndef __LIBC__mips32THREAD_H__ |
#define __LIBC__mips32THREAD_H__ |
#ifndef LIBC_mips32THREAD_H_ |
#define LIBC_mips32THREAD_H_ |
/* I did not find any specification (neither MIPS nor PowerPC), but |
* as I found it |
77,4 → 77,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/mips32/src/thread.c |
---|
58,4 → 58,3 |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/include/psthread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ia32PSTHREAD_H__ |
#define __LIBC__ia32PSTHREAD_H__ |
#ifndef LIBC_ia32_PSTHREAD_H_ |
#define LIBC_ia32_PSTHREAD_H_ |
#include <types.h> |
60,8 → 60,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/include/atomic.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ia32_ATOMIC_H__ |
#define __ia32_ATOMIC_H__ |
#ifndef LIBC_ia32_ATOMIC_H_ |
#define LIBC_ia32_ATOMIC_H_ |
static inline void atomic_inc(atomic_t *val) { |
__asm__ volatile ("lock incl %0\n" : "=m" (val->count)); |
74,8 → 74,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/include/endian.h |
---|
32,10 → 32,10 |
/** @file |
*/ |
#ifndef __ia32_ENDIAN_H__ |
#define __ia32_ENDIAN_H__ |
#ifndef LIBC_ia32_ENDIAN_H_ |
#define LIBC_ia32_ENDIAN_H_ |
#ifndef __LIBC__ENDIAN_H__ |
#ifndef LIBC_ENDIAN_H_ |
# error "Never use <libarch/endian.h> directly - use <endian.h> instead." |
#endif |
43,10 → 43,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/include/stackarg.h |
---|
32,14 → 32,13 |
/** @file |
*/ |
/* |
* Variable argument list manipulation macros |
* for architectures using stack to pass arguments. |
*/ |
#ifndef __LIBC_STACKARG_H__ |
#define __LIBC_STACKARG_H__ |
#ifndef LIBC_ia32_STACKARG_H_ |
#define LIBC_ia32_STACKARG_H_ |
#include <types.h> |
63,8 → 62,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/include/ddi.h |
---|
30,8 → 30,8 |
* @ingroup libcia32, libcamd64 |
*/ |
#ifndef __ia32_libc_DDI_H_ |
#define __ia32_libc_DDI_H_ |
#ifndef LIBC_ia32_DDI_H_ |
#define LIBC_ia32_DDI_H_ |
static inline void outb(int16_t port, uint8_t b) |
{ |
72,5 → 72,4 |
return val; |
} |
#endif |
/trunk/uspace/libc/arch/ia32/include/limits.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __ia32__LIMITS_H__ |
#define __ia32__LIMITS_H__ |
#ifndef LIBC_ia32__LIMITS_H_ |
#define LIBC_ia32__LIMITS_H_ |
# define LONG_MIN MIN_INT32 |
# define LONG_MAX MAX_INT32 |
42,9 → 42,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/include/types.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__TYPES_H__ |
#define __LIBC__TYPES_H__ |
#ifndef LIBC_ia32_TYPES_H_ |
#define LIBC_ia32_TYPES_H_ |
typedef unsigned int sysarg_t; |
typedef unsigned int size_t; |
/trunk/uspace/libc/arch/ia32/include/thread.h |
---|
32,8 → 32,8 |
/** @file |
*/ |
#ifndef __LIBC__ia32THREAD_H__ |
#define __LIBC__ia32THREAD_H__ |
#ifndef LIBC_ia32_THREAD_H_ |
#define LIBC_ia32_THREAD_H_ |
#include <libc.h> |
57,8 → 57,5 |
#endif |
/** @} |
*/ |
/trunk/uspace/libc/arch/ia32/src/syscall.c |
---|
57,4 → 57,3 |
/** @} |
*/ |