#include "core.h"
Defines | |
#define | DEBUG_RUNQ (1<<0u) |
#define | DEBUG (0) |
#define | AUTOWAIT(tcb) |
#define | TCBCHECKERR(Status) |
Functions | |
void | tcb_init () |
descriptor * | gdt_get (int idxsel) |
s_tcb_full * | get_tcb_from_idxsel (u_int idxsel, int type, int *err) |
s_tcb_full * | get_tcb_from_pid1 (pid_t pid) |
s_tcb_full * | get_tcb_from_pid2 (pid_t pid) |
void | sys_tcbsizepg (struct s_tcb_full *caller) |
void | sys_tcbreg (struct s_tcb_full *caller) |
void | sys_lname (struct s_tcb_full *caller) |
void | sys_lclass (struct s_tcb_full *caller) |
void | usig_reset (struct s_tcb_full *tcb) |
void | asop_i (struct s_tcb_full *tcb, struct s_as_full *ref_as, u_int32_t mode) |
void | sys_asop (struct s_tcb_full *caller) |
void | tcb_run (struct s_tcb_full *tcb) |
void | tcb_sleep (struct s_tcb_full *tcb) |
void | tcb_stop (struct s_tcb_full *tcb) |
void | tcb_dead (struct s_tcb_full *tcb, char *s) |
void | tcb_zombie (struct s_tcb_full *tcb) |
void | sys_lstatus (struct s_tcb_full *caller) |
void | sys_ltrace (struct s_tcb_full *caller) |
void | sys_lep (struct s_tcb_full *caller) |
void | sys_ltss (struct s_tcb_full *caller) |
void | sys_sgdt (struct s_tcb_full *caller) |
void | sys_lidt (struct s_tcb_full *caller) |
void | sys_sidt (struct s_tcb_full *caller) |
void | sys_stcb (struct s_tcb_full *caller) |
void | sys_stcb2 (struct s_tcb_full *caller) |
void | sys___sfulltcb2 (struct s_tcb_full *caller) |
void | sys_ssig (struct s_tcb_full *caller) |
void | sys_slink (struct s_tcb_full *caller) |
void | sys___sfulllink (struct s_tcb_full *caller) |
void | sys_llinkret (struct s_tcb_full *caller) |
void | sys_ioacquire (struct s_tcb_full *caller) |
void | sys_iorele (struct s_tcb_full *caller) |
int | gdtrsv (int nb_sels) |
void | sys_rcr3 (struct s_tcb_full *caller) |
void | runqs_init () |
void | runq_print (int cpu) |
void | sys_setrunq (struct s_tcb_full *caller) |
void | sys_setrunq2 (struct s_tcb_full *caller) |
void | sys_remrunq (struct s_tcb_full *caller) |
void | sys_remrunq2 (struct s_tcb_full *caller) |
int | asq (struct s_as_full *as) |
int | asdeq (struct s_as_full *as) |
int | tcbq (struct s_tcb_full *tcb) |
int | tcbdeq (struct s_tcb_full *tcb) |
void | sys_runq (struct s_tcb_full *caller) |
void | sys_setpgid (struct s_tcb_full *caller) |
void | sys_reparent (struct s_tcb_full *caller) |
void | sys_clearbsy (struct s_tcb_full *caller) |
void | sys_setbsy (struct s_tcb_full *caller) |
void | sys_exit (struct s_tcb_full *caller) |
void | sys_sclass (struct s_tcb_full *caller) |
void | sys_spid (struct s_tcb_full *caller) |
void | sys_sppid (struct s_tcb_full *caller) |
void | sys_sppid2 (struct s_tcb_full *caller) |
void | sys_spgid (struct s_tcb_full *caller) |
void | sys_spgid2 (struct s_tcb_full *caller) |
void | sys_getsel (struct s_tcb_full *caller) |
void | sys_sasid (struct s_tcb_full *caller) |
void | sys_sinfo (struct s_tcb_full *caller) |
void | sys_procdef (struct s_tcb_full *caller) |
void | sys_tcbunreg (struct s_tcb_full *caller) |
void | sys_ptrace (struct s_tcb_full *caller) |
void | sys_notify (struct s_tcb_full *caller) |
void | sys_lfpu (struct s_tcb_full *caller) |
void | sys_sfpu (struct s_tcb_full *caller) |
void | sys_sq_gate (struct s_tcb_full *caller) |
void | sys_nicepid (struct s_tcb_full *caller) |
void | sys_vm86 (struct s_tcb_full *caller) |
void | tcb_check (char *s) |
void | runq_check (char *s) |
Variables | |
vaddr_t | core_blankpgdir |
vaddr_t | raw_except_vpage |
vaddr_t | vpt2 |
vaddr_t | core_vpage1 |
paddr_t | pgdt |
descriptor * | gdt |
s_idt | idt [MAX_CPUS] |
t_area_set | kern_set |
s_as_list | ass [ASID_HSIZE] |
pid_t | next_pid |
s_tcb_full * | coresrv |
t_corestats | corestats [MAX_CPUS] |
int | nb_cpus = 1 |
s_tcb_list | procs |
s_tcb_list | tcbs [PID_HSIZE] |
pid_t | notify_mgr_pid = (pid_t)-1 |
pid_t | security_mgr_pid = (pid_t)-1 |
t_runq | runqs [MAX_CPUS] |
static union descriptor | tmp_descs [512] |
|
Value: if (notify_mgr_tcb)\ {\ tcb->status = TCBS_ZOMBIE;\ tcb->flags |= TCBF_WAITDONE;\ }\ else\ {\ tcb_dead(tcb, "tcb_zombie");\ } |
|
|
|
|
|
Value: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sanity/security checks: 1) if entry is a taskgate, check that tss exists and caller has the appropriate rights to do it. a) task must be a TCBC_SERVICE. 2) Don't authorize other types for now. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|