Modestus Moon OS
R4
CS 450 project
|
Files | |
file | pcb.h |
file | linked_list.h |
Functions | |
e_PROCESS_STATE_t | getState (const char *name) |
getState gets the current state of the process More... | |
e_PCB_ERROR_CODE_t | changeProcessState (const char *processName, e_PROCESS_STATE_t state) |
changeProcessState changes the state of the process being called More... | |
const char * | errorToString (e_PCB_ERROR_CODE_t error) |
errorToString creates a string form of the error passed in More... | |
const char * | classToString (e_PROCESS_CLASS_t processClass) |
classToString creates a string form of the class passed in More... | |
const char * | stateToString (e_PROCESS_STATE_t state) |
stateToString creates a string form of the state passed in More... | |
e_PROCESS_CLASS_t | stringToClass (const char *stringifiedClass) |
stringToClass returns the enum representation of a string More... | |
void | printPCBFunc (void *pcb) |
printPCBFunc prints the status of a process More... | |
void | setPrintFunction (linkedList_t *list, void(*newPrintFunc)(void *)) |
sets the function whose job it is to print the list to the screen. More... | |
This grouping provides a quick access to all development that occured during module R2. Each function or file that was added during this module can be found here.
e_PCB_ERROR_CODE_t changeProcessState | ( | const char * | processName, |
e_PROCESS_STATE_t | state | ||
) |
changeProcessState changes the state of the process being called
name | the name of the process to change the state of |
state | the state to change the process to |
Definition at line 168 of file pcb.c.
References BLOCKED, ERROR_PCB_NOT_FOUND, ERROR_STATE_INVALID, findPCB(), INITIAL, insertPCB(), prevPCBError, READY, removePCB(), RUNNING, SUCCESS, and TERMINAL.
Referenced by blockPCB(), and unblockPCB().
const char* classToString | ( | e_PROCESS_CLASS_t | processClass | ) |
classToString creates a string form of the class passed in
class | the class to parse to a string |
Definition at line 289 of file pcb.c.
References CLASS_UNKNOWN, SYSTEM, and USER_APP.
Referenced by printPCBFunc().
const char* errorToString | ( | e_PCB_ERROR_CODE_t | error | ) |
errorToString creates a string form of the error passed in
error | the error to parse to a string |
Definition at line 267 of file pcb.c.
References ERROR, ERROR_ALLOCATING_NODE, ERROR_CLASS_INVALID, ERROR_FREEING_NODE, ERROR_FREEING_PCB, ERROR_FREEING_STACK, ERROR_INSERTING_PCB, ERROR_NAME_COLLISION, ERROR_NAME_INVALID, ERROR_PCB_NOT_FOUND, ERROR_PRIORITY_INVALID, ERROR_REMOVING_PCB, ERROR_STATE_INVALID, and SUCCESS.
Referenced by blockPCB(), createPCB(), deletePCB(), resumePCB(), setPriority(), showPCB(), suspendPCB(), and unblockPCB().
e_PROCESS_STATE_t getState | ( | const char * | name | ) |
getState gets the current state of the process
name | the name of the process |
Definition at line 210 of file pcb.c.
References findPCB(), prevPCBError, and SUCCESS.
void printPCBFunc | ( | void * | pcb | ) |
printPCBFunc prints the status of a process
pcb | void pointer to a process |
Definition at line 335 of file pcb.c.
References classToString(), printf, stateToString(), and suspensionToString().
Referenced by initPCBQueues(), setPriority(), and showPCB().
void setPrintFunction | ( | linkedList_t * | list, |
void(*)(void *) | newPrintFunc | ||
) |
sets the function whose job it is to print the list to the screen.
list | to set the search funtion for |
newPrintFunc | pointer to function whose job is to print the data contained in the node. The argument of this function is the data conatined in the node. Traversal of the list starts one after the head and goes to the node before the tail. |
Definition at line 207 of file linked_list.c.
Referenced by initHeap(), initPCBQueues(), and listTest().
const char* stateToString | ( | e_PROCESS_STATE_t | state | ) |
stateToString creates a string form of the state passed in
state | the state to parse to a string |
Definition at line 301 of file pcb.c.
References BLOCKED, INITIAL, READY, RUNNING, STATE_UNKNOWN, and TERMINAL.
Referenced by printPCBFunc().
e_PROCESS_CLASS_t stringToClass | ( | const char * | stringifiedClass | ) |
stringToClass returns the enum representation of a string
stringifiedClass | the string that represents a process class enum |
Definition at line 328 of file pcb.c.
References CLASS_UNKNOWN, strcmp(), SYSTEM, and USER_APP.
Referenced by createPCB().