Changeset 985e26d2 in mainline for uspace/lib/libc/include/async_priv.h
- Timestamp:
- 2010-01-07T19:06:59Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8190e63
- Parents:
- 743e17b (diff), eca2435 (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. - File:
-
- 1 moved
-
uspace/lib/libc/include/async_priv.h (moved) (moved from kernel/arch/mips32/include/arg.h ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/async_priv.h
r743e17b r985e26d2 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 mips3229 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef KERN_mips32_ARG_H_36 #define KERN_mips32_ARG_H_35 #ifndef LIBC_ASYNC_PRIV_H_ 36 #define LIBC_ASYNC_PRIV_H_ 37 37 38 #include <arch/types.h> 38 #include <adt/list.h> 39 #include <fibril.h> 40 #include <sys/time.h> 41 #include <bool.h> 39 42 40 /** 41 * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) 42 * To satisfy this, paddings must be sometimes inserted. 43 */ 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; 44 53 45 typedef uintptr_t va_list; 54 /** Expiration time. */ 55 struct timeval expires; 56 } to_event_t; 46 57 47 #define va_start(ap, lst) \ 48 ((ap) = (va_list)&(lst) + sizeof(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; 49 66 50 #define va_arg(ap, type) \51 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uintptr_t)((ap) + 2*4 - 1) & (~3)) : ((uintptr_t)((ap) + 2*8 -1) & (~7)) )))[-1])52 67 53 #define va_copy(dst,src) ((dst)=(src)) 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; 54 75 55 #define va_end(ap) 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); 56 83 57 84 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
