sched: add current_task(), current_thread(), and preempt_disable/enable()
This commit is contained in:
@@ -15,8 +15,9 @@ typedef enum cpu_flags {
|
||||
typedef struct cpu_data {
|
||||
cpu_flags_t c_flags;
|
||||
unsigned int c_id;
|
||||
unsigned int c_preempt_count;
|
||||
|
||||
task_t *c_current_task;
|
||||
thread_t *c_current_thread;
|
||||
runqueue_t c_rq;
|
||||
} cpu_data_t;
|
||||
|
||||
@@ -35,6 +36,9 @@ extern void cpu_set_online(unsigned int cpu_id);
|
||||
#define irq_enable() ml_int_enable()
|
||||
#define irq_disable() ml_int_disable()
|
||||
|
||||
extern void preempt_disable(void);
|
||||
extern void preempt_enable(void);
|
||||
|
||||
extern unsigned int cpu_get_highest_available(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user