timer sleep and wakeup functions by Balazs-san

This commit is contained in:
Masamichi Takagi m-takagi@ab.jp.nec.com
2012-11-26 15:14:41 +09:00
parent 22bd5d8247
commit 337fe4b20d
7 changed files with 221 additions and 5 deletions

34
kernel/include/timer.h Normal file
View File

@@ -0,0 +1,34 @@
#include <types.h>
#include <kmsg.h>
#include <aal/cpu.h>
#include <cpulocal.h>
#include <aal/mm.h>
#include <aal/debug.h>
#include <aal/ikc.h>
#include <errno.h>
#include <cls.h>
#include <syscall.h>
#include <page.h>
#include <amemcpy.h>
#include <uio.h>
#include <aal/lock.h>
#include <ctype.h>
#include <waitq.h>
#include <rlimit.h>
#include <affinity.h>
#include <time.h>
#define TIMER_CPU_ID 227
struct timer {
uint64_t timeout;
struct waitq processes;
struct list_head list;
struct process *proc;
};
uint64_t schedule_timeout(uint64_t timeout);
void init_timers(void);
void wake_timers_loop(void);