#include <stdio.h>
#include <string.h>
#include <os_config.h>
#include <sys/init.h>
#include <config/config_param.h>
#include <config/config_cparam.h>
#include <sys/arch.h>
#include <sys/ktypes.h>
#include <sys/ksched.h>
#include <sys/process.h>
#include <sys/mem.h>
#include <sys/queue.h>
#include <sys/ksemaphore.h>
#include <sys/msg.h>
#include <sys/shm.h>
#include <sys/decls.h>
#include <sys/stats.h>
#include <sys/timer.h>
#include <pthread.h>
Functions | |
void | idle_task (void) |
pid_t | proc_create (unsigned int priority) |
int | process_invalidate (process_struct *proc) |
int | sys_process_status (pid_t pid, p_stat *ps) |
pid_t | sys_get_currentPID (void) |
void | process_block (queuep queue, unsigned int state) |
void | process_unblock (queuep queue) |
reent_t * | sys_get_reentrancy (void) |
Variables | |
void * | kernel_sp |
Process Table. | |
pid_t | current_pid = -1 |
Kernel Stack pointer. | |
pid_t | prev_pid = -1 |
Currently executing processes' ID. | |
process_struct * | current_process = NULL |
ID of process executing immediately before a context switch. |
|
|
|
Process creation primitive.
|
|
Block the process.
|
|
Remove the Process with pid. This is an internal proc that is called by sys_kill() and also by the schedulers to remove "DEAD" processes
|
|
Unblock the first process in queue and place it onto the ready queue. Call the process_scheduler only if this is PRIO scheduling. This is because we do not want the current process to prematurely lose its time slice. Change the state of the process to PROC_READY
|
|
Return the PID of the currently running process context
|
|
Return the kernel re-entrancy structure. This structure holds program level state information for the current process. Upon each context switch this structure is updated. to minimize the run-time efficiency, each application ELF file can query a pointer to this structure once and then use it for all subsequent state information queries.
|
|
Return the status of the process.
|