- Timestamp:
- 2005-10-16T19:49:15Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 75eacab
- Parents:
- 9cefba4
- Location:
- include
- Files:
-
- 2 edited
-
synch/synch.h (modified) (1 diff)
-
time/timeout.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/synch/synch.h
r9cefba4 rba1b2194 30 30 #define __SYNCH_H__ 31 31 32 #define SYNCH_NO_TIMEOUT 0 /**< No timeout is request. */32 #define SYNCH_NO_TIMEOUT 0 /**< Request with no timeout. */ 33 33 #define SYNCH_BLOCKING 0 /**< Blocking operation request. */ 34 34 #define SYNCH_NON_BLOCKING 1 /**< Non-blocking operation request. */ -
include/time/timeout.h
r9cefba4 rba1b2194 37 37 #define us2ticks(us) ((__u64)(((__u32) (us)/(1000000/HZ)))) 38 38 39 typedef void (* timeout_handler )(void *arg);39 typedef void (* timeout_handler_t)(void *arg); 40 40 41 41 struct timeout { 42 42 spinlock_t lock; 43 43 44 link_t link; 44 link_t link; /**< Link to the list of active timeouts on THE->cpu */ 45 45 46 __u64 ticks; 46 __u64 ticks; /**< Timeout will be activated in this amount of clock() ticks. */ 47 47 48 timeout_handler handler;49 void *arg; 48 timeout_handler_t handler; /**< Function that will be called on timeout activation. */ 49 void *arg; /**< Argument to be passed to handler() function. */ 50 50 51 cpu_t *cpu; 51 cpu_t *cpu; /**< On which processor is this timeout registered. */ 52 52 }; 53 53 … … 55 55 extern void timeout_initialize(timeout_t *t); 56 56 extern void timeout_reinitialize(timeout_t *t); 57 extern void timeout_register(timeout_t *t, __u64 usec, timeout_handler f, void *arg);58 extern inttimeout_unregister(timeout_t *t);57 extern void timeout_register(timeout_t *t, __u64 usec, timeout_handler_t f, void *arg); 58 extern bool timeout_unregister(timeout_t *t); 59 59 60 60 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
