Desktop/xinu_mips-1.0.2.tar/xinu_mips-1.0.2/system/create.c File Reference

#include <kernel.h>
#include <proc.h>
#include <vararg.h>
#include <mips.h>
#include <memory.h>
#include <string.h>

Include dependency graph for create.c:

Go to the source code of this file.

Functions

local newpid (void)
void userret (void)
syscall create (void *procaddr, ulong ssize, ushort priority, char *name, ulong nargs,...)


Detailed Description

create, newpid, userret

Id
create.c 241 2007-07-13 22:24:20Z agember

Definition in file create.c.


Function Documentation

syscall create ( void *  procaddr,
ulong  ssize,
ushort  priority,
char *  name,
ulong  nargs,
  ... 
)

Create a process to start running a procedure.

Parameters:
procaddr procedure address
ssize stack stack size in words
priority process priority, must be > 0
name name of the process, used for debugging
nargs,number of arguments that follow
Returns:
the new process' process id

Definition at line 28 of file create.c.

References CONTEXT_WORDS, getmem(), getpid(), INITRET, MINSTK, pentry::name, newpid(), numproc, pentry::parent, PNMLEN, pentry::prio, proctab, PRSUSP, roundew, STACKMAGIC, pentry::state, pentry::stkbase, pentry::stklen, pentry::stkptr, strncpy(), SYSERR, va_arg, va_end, and va_start.

Referenced by main(), nulluser(), shell(), test_bigargs(), test_deltaQueue(), test_procQueue(), test_recursion(), test_schedule(), test_semaphore(), test_semaphore2(), test_semaphore3(), test_semaphore4(), and testItem().

local newpid ( void   ) 

Obtain a new (free) process id.

Returns:
a free process id, SYSERR if all ids are used

Definition at line 100 of file create.c.

References NPROC, PRFREE, proctab, and SYSERR.

Referenced by create().

void userret ( void   ) 

Entered when a process exits by return.

Definition at line 117 of file create.c.

References getpid(), and kill().


Generated on Thu Oct 9 22:35:00 2008 for xinu by  doxygen 1.5.5