Added a new system call sys_timer.

sys_timer accumulates timer ticks into seconds, minutes, hours and days.
It's left to the user to calculate from days into a date. It is not yet
known if the calculation is even roughly correct.

Reduced 2 kmem_reclaim/grant calls into one kmem_control call.
This commit is contained in:
Bahadir Balban
2008-04-18 00:46:29 +01:00
parent 73058dc249
commit a87914910c
12 changed files with 122 additions and 133 deletions

View File

@@ -11,8 +11,8 @@
#include INC_GLUE(memory.h)
/* Ticks per second, try ticks = 1000 + timeslice = 1 for regressed preemption test. */
#define HZ 10
#define TASK_TIMESLICE_DEFAULT 500
#define HZ 100
#define TASK_TIMESLICE_DEFAULT 5000
/* #define TASK_TIMESLICE_DEFAULT (HZ/100)*/
static inline struct ktcb *current_task(void)
@@ -42,11 +42,11 @@ void sched_runqueue_init(void);
void sched_start_task(struct ktcb *task);
void sched_resume_task(struct ktcb *task);
void sched_suspend_task(struct ktcb *task);
void sched_process_post_ipc(struct ktcb *, struct ktcb *);
void sched_tell(struct ktcb *task, unsigned int flags);
void scheduler_start(void);
void sched_yield(void);
void schedule(void);
/* Asynchronous notifications to scheduler */
void sched_notify_resume(struct ktcb *task);
void sched_notify_sleep(struct ktcb *task);