=================================================================== RCS file: /cvs/prex-old/doc/html/doc/kernel.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- prex-old/doc/html/doc/kernel.html 2008/06/03 10:38:43 1.1.1.1 +++ prex-old/doc/html/doc/kernel.html 2008/08/13 17:12:26 1.1.1.1.2.1 @@ -23,7 +23,7 @@ Prex logo + style="width: 250px; height: 54px;"> An Open Source, Royalty-free,
@@ -43,7 +43,8 @@ - + +

Prex Kernel Internals

Version 1.4, 2005/12/31 @@ -236,28 +237,28 @@ int state; /* thread state */ int policy; /* scheduling policy */ int prio; /* current priority */ - int base_prio; /* base priority */ - int ticks_left; /* remaining ticks to run */ - u_int total_ticks; /* total running ticks */ - int need_resched; /* true if rescheduling is needed */ - int lock_count; /* schedule lock counter */ - int suspend_count; /* suspend counter */ - struct event *sleep_event; /* sleep event */ - int sleep_result; /* sleep result */ + int baseprio; /* base priority */ + int timeleft; /* remaining ticks to run */ + u_int time; /* total running time */ + int resched; /* true if rescheduling is needed */ + int locks; /* schedule lock counter */ + int suscnt; /* suspend counter */ + struct event *slpevt; /* sleep event */ + int slpret; /* sleep result code */ struct timer timeout; /* thread timer */ struct timer *periodic; /* pointer to periodic timer */ + uint32_t excbits; /* bitmap of pending exceptions */ struct queue ipc_link; /* linkage on IPC queue */ - void *msg_addr; /* kernel address of IPC message */ - size_t msg_size; /* size of IPC message */ - struct thread *sender; /* thread that sends IPC message */ - struct thread *receiver; /* thread that receives IPC message */ - object_t send_obj; /* IPC object sending to */ - object_t recv_obj; /* IPC object receiving from */ - uint32_t exc_bitmap; /* bitmap of pending exceptions */ + void *msgaddr; /* kernel address of IPC message */ + size_t msgsize; /* size of IPC message */ + thread_t sender; /* thread that sends IPC message */ + thread_t receiver; /* thread that receives IPC message */ + object_t sendobj; /* IPC object sending to */ + object_t recvobj; /* IPC object receiving from */ struct list mutexes; /* mutexes locked by this thread */ struct mutex *wait_mutex; /* mutex pointer currently waiting */ void *kstack; /* base address of kernel stack */ - struct context context; /* machine specific context */ + struct context ctx; /* machine specific context */ };

Thread Creation

@@ -505,7 +506,13 @@

Each thread has one of the following states.

+

+Memory Structure
+Figure 2. Thread States +

+