Changeset db24058 in mainline for uspace/lib/libc/include
- Timestamp:
- 2009-06-30T15:53:15Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d11a7d8
- Parents:
- 6db6fd1
- Location:
- uspace/lib/libc/include
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/async.h
r6db6fd1 rdb24058 47 47 extern atomic_t async_futex; 48 48 49 extern int __async_init(void); 50 extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs); 51 52 static inline ipc_callid_t async_get_call(ipc_call_t *data) 53 { 54 return async_get_call_timeout(data, 0); 55 } 56 49 57 static inline void async_manager(void) 50 58 { 51 59 fibril_switch(FIBRIL_TO_MANAGER); 52 }53 54 extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);55 56 static inline ipc_callid_t async_get_call(ipc_call_t *data)57 {58 return async_get_call_timeout(data, 0);59 60 } 60 61 … … 95 96 extern void async_create_manager(void); 96 97 extern void async_destroy_manager(void); 97 extern int _async_init(void);98 98 99 99 extern void async_set_client_connection(async_client_conn_t conn); -
uspace/lib/libc/include/bitops.h
r6db6fd1 rdb24058 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 43 43 * If number is zero, it returns 0 44 44 */ 45 static inline int fnzb32(uint32_t arg)45 static inline unsigned int fnzb32(uint32_t arg) 46 46 { 47 int n = 0;48 47 unsigned int n = 0; 48 49 49 if (arg >> 16) { 50 50 arg >>= 16; … … 75 75 } 76 76 77 static inline int fnzb64(uint64_t arg)77 static inline unsigned int fnzb64(uint64_t arg) 78 78 { 79 int n = 0;80 79 unsigned int n = 0; 80 81 81 if (arg >> 32) { 82 82 arg >>= 32; … … 84 84 } 85 85 86 return n + fnzb32((uint32_t) arg);86 return (n + fnzb32((uint32_t) arg)); 87 87 } 88 88 89 #define fnzb(x) fnzb32(x) 89 static inline unsigned int fnzb(size_t arg) 90 { 91 return fnzb64(arg); 92 } 90 93 91 94 #endif -
uspace/lib/libc/include/errno.h
r6db6fd1 rdb24058 36 36 #define LIBC_ERRNO_H_ 37 37 38 /* TODO: support threads/fibrils */ 38 #include <kernel/errno.h> 39 #include <fibril.h> 40 39 41 extern int _errno; 42 40 43 #define errno _errno 41 42 #include <kernel/errno.h>43 44 44 45 #define EMFILE (-17) -
uspace/lib/libc/include/getopt.h
r6db6fd1 rdb24058 59 59 60 60 /* HelenOS Port - These need to be exposed for legacy getopt() */ 61 extern c har *optarg;61 extern const char *optarg; 62 62 extern int optind, opterr, optopt; 63 63 extern int optreset; -
uspace/lib/libc/include/macros.h
r6db6fd1 rdb24058 36 36 #define LIBC_MACROS_H_ 37 37 38 #define min(a, b) ((a) < (b) ? (a) : (b)) 39 #define max(a, b) ((a) > (b) ? (a) : (b)) 40 38 41 #define SIZE2KB(size) ((size) >> 10) 39 42 #define SIZE2MB(size) ((size) >> 20) -
uspace/lib/libc/include/mem.h
r6db6fd1 rdb24058 40 40 #define bzero(ptr, len) memset((ptr), 0, (len)) 41 41 42 extern void * 43 extern void * 44 extern void * 42 extern void *memset(void *, int, size_t); 43 extern void *memcpy(void *, const void *, size_t); 44 extern void *memmove(void *, const void *, size_t); 45 45 46 46 extern int bcmp(const char *, const char *, size_t); -
uspace/lib/libc/include/stdio.h
r6db6fd1 rdb24058 38 38 #include <sys/types.h> 39 39 #include <stdarg.h> 40 #include <string.h> 40 41 #include <adt/list.h> 41 42 … … 43 44 44 45 /** Default size for stream I/O buffers */ 45 #define BUFSIZ 409646 #define BUFSIZ 4096 46 47 47 48 #define DEBUG(fmt, ...) \ 48 { \49 charbuf[256]; \50 int n = snprintf(buf, sizeof(buf), fmt, ##__VA_ARGS__); \51 if (n > 0) \52 (void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, str_size(buf)); \53 }49 { \ 50 char _buf[256]; \ 51 int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \ 52 if (_n > 0) \ 53 (void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \ 54 } 54 55 55 56 #ifndef SEEK_SET -
uspace/lib/libc/include/stdlib.h
r6db6fd1 rdb24058 39 39 #include <malloc.h> 40 40 41 #define abort() _exit(1)42 #define exit(status) 41 #define abort() _exit(1) 42 #define exit(status) _exit((status)) 43 43 44 #define RAND_MAX 71402544 #define RAND_MAX 714025 45 45 46 46 extern long int random(void); … … 51 51 return random(); 52 52 } 53 53 54 static inline void srand(unsigned int seed) 54 55 { -
uspace/lib/libc/include/unistd.h
r6db6fd1 rdb24058 66 66 67 67 extern void _exit(int status) __attribute__ ((noreturn)); 68 extern void *sbrk(ssize_t incr);69 68 extern int usleep(unsigned long usec); 70 69 extern unsigned int sleep(unsigned int seconds); -
uspace/lib/libc/include/vfs/vfs.h
r6db6fd1 rdb24058 56 56 unsigned int); 57 57 58 extern void stdio_init(int filc, fdi_node_t *filv[]);59 extern void stdio_done(void);58 extern void __stdio_init(int filc, fdi_node_t *filv[]); 59 extern void __stdio_done(void); 60 60 61 61 extern int open_node(fdi_node_t *, int);
Note:
See TracChangeset
for help on using the changeset viewer.