/trunk/kernel/generic/include/time/timeout.h |
---|
44,7 → 44,7 |
typedef void (* timeout_handler_t)(void *arg); |
struct timeout { |
typedef struct { |
SPINLOCK_DECLARE(lock); |
link_t link; /**< Link to the list of active timeouts on THE->cpu */ |
55,7 → 55,7 |
void *arg; /**< Argument to be passed to handler() function. */ |
cpu_t *cpu; /**< On which processor is this timeout registered. */ |
}; |
} timeout_t; |
extern void timeout_init(void); |
extern void timeout_initialize(timeout_t *t); |
/trunk/kernel/generic/include/proc/scheduler.h |
---|
45,11 → 45,11 |
#define NEEDS_RELINK_MAX (HZ) |
/** Scheduler run queue structure. */ |
struct runq { |
typedef struct { |
SPINLOCK_DECLARE(lock); |
link_t rq_head; /**< List of ready threads. */ |
count_t n; /**< Number of threads in rq_ready. */ |
}; |
} runq_t; |
extern atomic_t nrdy; |
extern void scheduler_init(void); |
/trunk/kernel/generic/include/arch.h |
---|
59,13 → 59,13 |
* of the following type will be placed at |
* the base address of the stack. |
*/ |
struct the { |
typedef struct { |
count_t preemption_disabled; /**< Preemption disabled counter. */ |
thread_t *thread; /**< Current thread. */ |
task_t *task; /**< Current task. */ |
cpu_t *cpu; /**< Executing cpu. */ |
as_t *as; /**< Current address space. */ |
}; |
} the_t; |
#define THE ((the_t *)(get_stack_base())) |
/trunk/kernel/generic/include/typedefs.h |
---|
52,10 → 52,6 |
typedef struct context context_t; |
typedef struct fpu_context fpu_context_t; |
typedef struct timeout timeout_t; |
typedef struct runq runq_t; |
typedef struct spinlock spinlock_t; |
typedef struct mutex mutex_t; |
typedef struct semaphore semaphore_t; |
73,8 → 69,6 |
typedef struct link link_t; |
typedef struct the the_t; |
typedef struct chardev chardev_t; |
typedef enum cmd_arg_type cmd_arg_type_t; |