Changeset 1787e527 in mainline for uspace/lib/libc/include
- Timestamp:
- 2009-11-16T21:22:54Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ebdf94
- Parents:
- fcbd1be (diff), 9c70ed6 (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. - Location:
- uspace/lib/libc/include
- Files:
-
- 13 edited
- 1 moved
-
async.h (modified) (2 diffs)
-
async_priv.h (moved) (moved from uspace/lib/libc/arch/ia32/include/stackarg.h ) (3 diffs)
-
fcntl.h (modified) (1 diff)
-
fibril_sync.h (modified) (2 diffs)
-
io/console.h (modified) (1 diff)
-
ipc/bd.h (modified) (1 diff)
-
ipc/ipc.h (modified) (2 diffs)
-
ipc/loader.h (modified) (1 diff)
-
ipc/vfs.h (modified) (1 diff)
-
loader/loader.h (modified) (1 diff)
-
loader/pcb.h (modified) (1 diff)
-
malloc.h (modified) (1 diff)
-
stdarg.h (modified) (1 diff)
-
unistd.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/async.h
rfcbd1be r1787e527 47 47 extern atomic_t async_futex; 48 48 49 extern atomic_t threads_in_ipc_wait; 50 49 51 extern int __async_init(void); 50 52 extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs); … … 257 259 } 258 260 261 /* 262 * User-friendly wrappers for async_share_in_start(). 263 */ 264 #define async_share_in_start_0_0(phoneid, dst, size) \ 265 async_share_in_start((phoneid), (dst), (size), 0, NULL) 266 #define async_share_in_start_0_1(phoneid, dst, size, flags) \ 267 async_share_in_start((phoneid), (dst), (size), 0, (flags)) 268 #define async_share_in_start_1_0(phoneid, dst, size, arg) \ 269 async_share_in_start((phoneid), (dst), (size), (arg), NULL) 270 #define async_share_in_start_1_1(phoneid, dst, size, arg, flags) \ 271 async_share_in_start((phoneid), (dst), (size), (arg), (flags)) 272 273 extern int async_share_in_start(int, void *, size_t, ipcarg_t, int *); 274 extern int async_share_in_receive(ipc_callid_t *, size_t *); 275 extern int async_share_in_finalize(ipc_callid_t, void *, int ); 276 extern int async_share_out_start(int, void *, int); 277 extern int async_share_out_receive(ipc_callid_t *, size_t *, int *); 278 extern int async_share_out_finalize(ipc_callid_t, void *); 279 extern int async_data_read_start(int, void *, size_t); 280 extern int async_data_read_receive(ipc_callid_t *, size_t *); 281 extern int async_data_read_finalize(ipc_callid_t, const void *, size_t); 282 extern int async_data_write_start(int, const void *, size_t); 283 extern int async_data_write_receive(ipc_callid_t *, size_t *); 284 extern int async_data_write_finalize(ipc_callid_t, void *, size_t); 285 259 286 #endif 260 287 -
uspace/lib/libc/include/async_priv.h
rfcbd1be r1787e527 1 1 /* 2 * Copyright (c) 200 5 Jakub Jermar2 * Copyright (c) 2006 Ondrej Palkovsky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libc ia3229 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 /* 36 * Variable argument list manipulation macros 37 * for architectures using stack to pass arguments. 38 */ 39 40 #ifndef LIBC_ia32_STACKARG_H_ 41 #define LIBC_ia32_STACKARG_H_ 35 #ifndef LIBC_ASYNC_PRIV_H_ 36 #define LIBC_ASYNC_PRIV_H_ 42 37 43 #include <sys/types.h> 38 #include <adt/list.h> 39 #include <fibril.h> 40 #include <sys/time.h> 41 #include <bool.h> 44 42 45 /* dont allow to define it second time in stdarg.h */ 46 #define __VARARGS_DEFINED 43 /** Structures of this type are used to track the timeout events. */ 44 typedef struct { 45 /** If true, this struct is in the timeout list. */ 46 bool inlist; 47 48 /** Timeout list link. */ 49 link_t link; 50 51 /** If true, we have timed out. */ 52 bool occurred; 47 53 48 typedef struct va_list { 49 int pos; 50 uint8_t *last; 51 } va_list; 54 /** Expiration time. */ 55 struct timeval expires; 56 } to_event_t; 52 57 53 #define va_start(ap, lst) \ 54 (ap).pos = sizeof(lst); \ 55 (ap).last = (uint8_t *) &(lst) 58 /** Structures of this type are used to track the wakeup events. */ 59 typedef struct { 60 /** If true, this struct is in a synchronization object wait queue. */ 61 bool inlist; 62 63 /** Wait queue linkage. */ 64 link_t link; 65 } wu_event_t; 56 66 57 #define va_arg(ap, type) \58 (*((type *)((ap).last + ((ap).pos += sizeof(type) ) - sizeof(type))))59 67 60 #define va_end(ap) 68 /** Structures of this type represent a waiting fibril. */ 69 typedef struct { 70 /** Identification of and link to the waiting fibril. */ 71 fid_t fid; 72 73 /** If true, this fibril is currently active. */ 74 bool active; 61 75 76 /** Timeout wait data. */ 77 to_event_t to_event; 78 /** Wakeup wait data. */ 79 wu_event_t wu_event; 80 } awaiter_t; 81 82 extern void async_insert_timeout(awaiter_t *wd); 62 83 63 84 #endif -
uspace/lib/libc/include/fcntl.h
rfcbd1be r1787e527 43 43 #define O_RDWR 32 44 44 #define O_WRONLY 64 45 #define O_DESC 128 45 46 46 47 extern int open(const char *, int, ...); -
uspace/lib/libc/include/fibril_sync.h
rfcbd1be r1787e527 40 40 #include <adt/list.h> 41 41 #include <libarch/tls.h> 42 #include <sys/time.h> 42 43 43 44 typedef struct { … … 95 96 96 97 extern void fibril_condvar_initialize(fibril_condvar_t *); 98 extern int fibril_condvar_wait_timeout(fibril_condvar_t *, fibril_mutex_t *, 99 suseconds_t); 97 100 extern void fibril_condvar_wait(fibril_condvar_t *, fibril_mutex_t *); 98 101 extern void fibril_condvar_signal(fibril_condvar_t *); -
uspace/lib/libc/include/io/console.h
rfcbd1be r1787e527 68 68 extern void console_clear(int phone); 69 69 70 extern int console_get_size(int phone, i pcarg_t *rows, ipcarg_t *cols);71 extern void console_goto(int phone, i pcarg_t row, ipcarg_t col);70 extern int console_get_size(int phone, int *cols, int *rows); 71 extern void console_goto(int phone, int col, int row); 72 72 73 73 extern void console_set_style(int phone, int style); -
uspace/lib/libc/include/ipc/bd.h
rfcbd1be r1787e527 39 39 40 40 typedef enum { 41 BD_READ_BLOCK = IPC_FIRST_USER_METHOD, 42 BD_WRITE_BLOCK 41 BD_GET_BLOCK_SIZE = IPC_FIRST_USER_METHOD, 42 BD_READ_BLOCKS, 43 BD_WRITE_BLOCKS 43 44 } bd_request_t; 44 45 -
uspace/lib/libc/include/ipc/ipc.h
rfcbd1be r1787e527 192 192 extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int); 193 193 extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t); 194 extern void ipc_poke(void); 194 195 195 196 static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data) … … 282 283 283 284 extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *); 284 extern int ipc_share_in_receive(ipc_callid_t *, size_t *);285 285 extern int ipc_share_in_finalize(ipc_callid_t, void *, int ); 286 286 extern int ipc_share_out_start(int, void *, int); 287 extern int ipc_share_out_receive(ipc_callid_t *, size_t *, int *);288 287 extern int ipc_share_out_finalize(ipc_callid_t, void *); 289 288 extern int ipc_data_read_start(int, void *, size_t); 290 extern int ipc_data_read_receive(ipc_callid_t *, size_t *);291 289 extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t); 292 290 extern int ipc_data_write_start(int, const void *, size_t); 293 extern int ipc_data_write_receive(ipc_callid_t *, size_t *);294 291 extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t); 295 292 -
uspace/lib/libc/include/ipc/loader.h
rfcbd1be r1787e527 41 41 LOADER_HELLO = IPC_FIRST_USER_METHOD, 42 42 LOADER_GET_TASKID, 43 LOADER_SET_CWD, 43 44 LOADER_SET_PATHNAME, 44 45 LOADER_SET_ARGS, -
uspace/lib/libc/include/ipc/vfs.h
rfcbd1be r1787e527 73 73 VFS_IN_UNLINK, 74 74 VFS_IN_RENAME, 75 VFS_IN_STAT 75 VFS_IN_STAT, 76 VFS_IN_DUP 76 77 } vfs_in_request_t; 77 78 -
uspace/lib/libc/include/loader/loader.h
rfcbd1be r1787e527 49 49 extern loader_t *loader_connect(void); 50 50 extern int loader_get_task_id(loader_t *, task_id_t *); 51 extern int loader_set_cwd(loader_t *); 51 52 extern int loader_set_pathname(loader_t *, const char *); 52 53 extern int loader_set_args(loader_t *, char *const[]); -
uspace/lib/libc/include/loader/pcb.h
rfcbd1be r1787e527 52 52 /** Program entry point. */ 53 53 entry_point_t entry; 54 55 /** Current working directory. */ 56 char *cwd; 54 57 55 58 /** Number of command-line arguments. */ -
uspace/lib/libc/include/malloc.h
rfcbd1be r1787e527 42 42 43 43 extern void *malloc(const size_t size); 44 extern void *calloc(const size_t nmemb, const size_t size); 44 45 extern void *memalign(const size_t align, const size_t size); 45 46 extern void *realloc(const void *addr, const size_t size); -
uspace/lib/libc/include/stdarg.h
rfcbd1be r1787e527 37 37 38 38 #include <sys/types.h> 39 #include <libarch/stackarg.h>40 41 #ifndef __VARARGS_DEFINED42 # define __VARARGS_DEFINED43 39 44 40 typedef __builtin_va_list va_list; 45 41 46 # define va_start(ap, last) __builtin_va_start(ap, last) 47 # define va_arg(ap, type) __builtin_va_arg(ap, type) 48 # define va_end(ap) __builtin_va_end(ap) 49 50 # endif 42 #define va_start(ap, last) __builtin_va_start(ap, last) 43 #define va_arg(ap, type) __builtin_va_arg(ap, type) 44 #define va_end(ap) __builtin_va_end(ap) 51 45 52 46 #endif -
uspace/lib/libc/include/unistd.h
rfcbd1be r1787e527 51 51 #endif 52 52 53 extern int dup2(int oldfd, int newfd); 54 53 55 extern ssize_t write(int, const void *, size_t); 54 56 extern ssize_t read(int, void *, size_t);
Note:
See TracChangeset
for help on using the changeset viewer.
