next up previous contents
Next: Scheduler Lock Up: Scheduler API Previous: Scheduler API   Contents

The sched_info structure

We have come up with the set of functions which the application developer is expected to code. It's a part of the sched_info structure . A pointer to the structure is passed as argument to rtker_init() , during rtker initialization.

struct sched_info{
  spinlock_t sched_lock;
  oskit_u32_t (*init)(struct tcb *main_tcb);
  oskit_u32_t (*new_thread)(struct tcb *);
  struct tcb *(*heir_thread)(struct tcb *);
  oskit_u32_t (*set_mode)(struct tcb *,oskit_u32_t);
  oskit_u32_t (*reset_thread)(struct tcb *);
  oskit_u32_t (*delete_thread)(struct tcb *);
  oskit_u32_t (*set_priority)(struct tcb *,oskit_u32_t);
  oskit_u32_t (*get_priority)(struct tcb *);
  void (*tick)(void);
}


Soumyadeb Mitra 2002-08-07