Changeset 4f5dc18 in mainline for uspace/lib/libc/include/async_priv.h
- Timestamp:
- 2009-11-03T21:36:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1647323
- Parents:
- bbddafb (diff), b1c21c2 (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
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/async_priv.h
rbbddafb r4f5dc18 1 1 /* 2 * Copyright (c) 2006 Josef Cejka2 * Copyright (c) 2006 Ondrej Palkovsky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libc mips3229 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 32 /** @file 33 * @ingroup libcmips32eb34 33 */ 35 34 36 #ifndef LIBC_ mips32_STACKARG_H_37 #define LIBC_ mips32_STACKARG_H_35 #ifndef LIBC_ASYNC_PRIV_H_ 36 #define LIBC_ASYNC_PRIV_H_ 38 37 39 /* dont allow to define it second time in stdarg.h */ 40 #define __VARARGS_DEFINED 38 #include <adt/list.h> 39 #include <fibril.h> 40 #include <sys/time.h> 41 #include <bool.h> 41 42 42 #include <sys/types.h> 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; 43 53 44 /** 45 * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) 46 * To satisfy this, paddings must be sometimes inserted. 47 */ 54 /** Expiration time. */ 55 struct timeval expires; 56 } to_event_t; 48 57 49 typedef uint8_t* va_list; 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; 50 66 51 #define va_start(ap, lst) \52 ((ap) = (va_list)&(lst) + sizeof(lst))53 67 54 #define va_arg(ap, type) \ 55 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uint32_t)((ap) + 2*4 - 1) & (~3)) : ((uint32_t)((ap) + 2*8 -1) & (~7)) )))[-1]) 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; 56 75 57 #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); 58 83 59 84 #endif
Note:
See TracChangeset
for help on using the changeset viewer.