===================================================================
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 @@
+ 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.
+
+
+Figure 2. Thread States
+
+
- RUN :Running or ready to run
- SLEEP :Sleep for some event
@@ -549,6 +556,7 @@
+
Scheduling Policy
There are following three types of scheduling policy.
@@ -605,7 +613,7 @@
-Figure 2. Prex Memory Structure
+Figure 3. Prex Memory Structure
The key point is that Prex kernel does not page out to
@@ -695,7 +703,7 @@
-Figure 3. Kernel Memory Mapping
+Figure 4. Kernel Memory Mapping
@@ -781,7 +789,7 @@
-Figure 4. IPC Transmit Sequence
+Figure 5. IPC Transmit Sequence
Message Transfer
@@ -796,7 +804,7 @@
-Figure 5. IPC message transfer
+Figure 6. IPC message transfer
Exception Handling
@@ -919,7 +927,7 @@
-Figure 6. Prex Interrupt Processing
+Figure 7. Prex Interrupt Processing
@@ -1052,7 +1060,7 @@
Debug
There are following debugging support functions:
- - printk(): Display the debug message in kernel.
+ - printf(): Display the debug message in kernel.
- panic(): Dump processor registers and stop system.
- ASSERT(): If expression is false (zero), stop system and display information.
- trace_on(): If the kernel trace is enabled, all entry/exit of functions
|