Changeset 831a04d0 in mainline for kernel/generic/include/time/timeout.h
- Timestamp:
- 2007-01-29T20:01:12Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b612ded6
- Parents:
- 1004b37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/time/timeout.h
r1004b37 r831a04d0 37 37 38 38 #include <arch/types.h> 39 #include <proc/task.h> 39 #include <adt/list.h> 40 #include <cpu.h> 41 42 typedef void (* timeout_handler_t)(void *arg); 43 44 typedef struct { 45 SPINLOCK_DECLARE(lock); 46 47 link_t link; /**< Link to the list of active timeouts on THE->cpu */ 48 49 uint64_t ticks; /**< Timeout will be activated in this amount of clock() ticks. */ 50 51 timeout_handler_t handler; /**< Function that will be called on timeout activation. */ 52 void *arg; /**< Argument to be passed to handler() function. */ 53 54 cpu_t *cpu; /**< On which processor is this timeout registered. */ 55 } timeout_t; 40 56 41 57 #define us2ticks(us) ((uint64_t) (((uint32_t) (us) / (1000000 / HZ))))
Note:
See TracChangeset
for help on using the changeset viewer.