| UbixOS
    2.0
    | 
#include <sys/types.h>#include <vfs/file.h>#include <ubixos/tty.h>#include <sys/tss.h>#include <sys/thread.h>

Go to the source code of this file.
| Data Structures | |
| struct | osInfo | 
| struct | taskStruct | 
| Macros | |
| #define | NO_GROUP -1 | 
| #define | NR_GROUPS 32 | 
| Typedefs | |
| typedef struct taskStruct | kTask_t | 
| Enumerations | |
| enum | tState { PLACEHOLDER = -2, DEAD = -1, NEW = 0, READY = 1, RUNNING = 2, IDLE = 3, FORK = 4, WAIT = 5, UNINTERRUPTIBLE = 6, INTERRUPTIBLE = 7 } | 
| Functions | |
| void | sched () | 
| int | sched_addDelTask (kTask_t *) | 
| int | sched_deleteTask (pidType) | 
| kTask_t * | sched_getDelTask () | 
| int | sched_init () | 
| int | sched_setStatus (pidType, tState) | 
| void | sched_yield () | 
| void | schedEndTask (pidType pid) | 
| kTask_t * | schedFindTask (uInt32 id) | 
| kTask_t * | schedNewTask () | 
| Variables | |
| kTask_t * | _current | 
| kTask_t * | _usedMath | 
| typedef struct taskStruct kTask_t | 
| enum tState | 
| void sched | ( | ) | 
Definition at line 80 of file sched.c.
References spinTryLock().
Referenced by sched_yield().

| int sched_addDelTask | ( | kTask_t * | ) | 
Definition at line 186 of file sched.c.
References taskStruct::next.
| kTask_t* sched_getDelTask | ( | ) | 
Definition at line 195 of file sched.c.
Referenced by systemTask().
Definition at line 265 of file sched.c.
References schedFindTask(), and taskStruct::state.
Referenced by endTask(), execFile(), execThread(), and sys_wait4().

| void sched_yield | ( | ) | 
Definition at line 244 of file sched.c.
References sched().
Referenced by __alignmentCheck(), __debug(), __divideError(), __doubleFault(), __floatingPoint(), __machineCheck(), __nmi(), __security(), __simd(), __virtualization(), biosCall(), endTask(), fork_copyProcess(), lnc_thread(), schedEndTask(), sdeTestThread(), sdeThread(), spinLock(), sys_fgetc(), sys_fork(), sys_pread(), sys_read(), sys_sched_yield(), sys_wait4(), sysSchedYield(), systemTask(), ubthread_cond_timedwait(), and ubthread_cond_wait().

| void schedEndTask | ( | pidType | pid | ) | 
Definition at line 228 of file sched.c.
References _current, endTask(), taskStruct::id, and sched_yield().

Definition at line 207 of file sched.c.
Referenced by sched_setStatus(), sys_setpgid(), sys_wait4(), sysCheckPid(), and systemTask().
| kTask_t* schedNewTask | ( | ) | 
Definition at line 135 of file sched.c.
References file::f_flag, kmalloc(), kpanic(), memcpy(), memset(), NEW, thread::o_files, spinLock(), taskStruct::state, taskStruct::td, taskStruct::usedMath, and taskStruct::username.
Referenced by biosCall(), execFile(), execThread(), and sys_fork().

| kTask_t* _current | 
Definition at line 50 of file sched.c.
Referenced by __alignmentCheck(), __debug(), __divideError(), __doubleFault(), __floatingPoint(), __machineCheck(), __nmi(), __security(), __simd(), __virtualization(), biosCall(), elf_load_file(), execFile(), fopen(), fork_copyProcess(), freebsd6_mmap(), fstat(), getgid(), getpid(), getuid(), in_group_p(), invalidCall(), invalidCall_posix(), kmod_load(), ldEnable(), lookup(), mathStateRestore(), pbuf_free(), permission(), schedEndTask(), sys_call(), sys_call_posix(), sys_chdir(), sys_exit(), sys_fchdir(), sys_fgetc(), sys_fork(), sys_fwrite(), sys_getcwd(), sys_getegid(), sys_getEUID(), sys_geteuid(), sys_getGID(), sys_getlogin(), sys_getpgrp(), sys_getpid(), sys_getppid(), sys_getUID(), sys_invalid(), sys_mmap(), sys_pread(), sys_read(), sys_setGID(), sys_setlogin(), sys_setpgid(), sys_setUID(), sys_wait4(), sysExec(), sysFwrite(), sysGetCwd(), sysGetFreePage(), sysGetGid(), sysGetpid(), sysGetUid(), sysMkDir(), sysPasswd(), sysSDE(), ubthread_mutex_lock(), ubthread_mutex_unlock(), ubthread_self(), and vmm_pageFault().
| kTask_t* _usedMath | 
Definition at line 51 of file sched.c.
Referenced by mathStateRestore().