Ignore:
Timestamp:
2007-01-29T20:01:12Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b612ded6
Parents:
1004b37
Message:

move timeout_t to timeout.h
move other helper types to thread.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/time/timeout.h

    r1004b37 r831a04d0  
    3737
    3838#include <arch/types.h>
    39 #include <proc/task.h>
     39#include <adt/list.h>
     40#include <cpu.h>
     41
     42typedef void (* timeout_handler_t)(void *arg);
     43
     44typedef 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;
    4056
    4157#define us2ticks(us)    ((uint64_t) (((uint32_t) (us) / (1000000 / HZ))))
Note: See TracChangeset for help on using the changeset viewer.