(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/dos.h>

struct MsgPort * CreateProc (name , pri , segList , stackSize)

LOCATION
In DOSBase at offset 23

SYNOPSIS
STRPTR name
LONG pri
BPTR segList
LONG stackSize

FUNCTION
CreateProc() will create a new process (a process is a superset of an exec Task), with the name 'name' and the priority 'pri'.

You should pass a segList as returned by LoadSeg() (or similar) in the 'segList' parameter, and specify the stack size in 'stackSize'.

You should really use CreateNewProc() rather than this function as it is much more flexible.

INPUTS
name
Name of the new process.
pri
Starting priority.
segList
BCPL pointer to a seglist.
stackSize
The size of the initial process stack.

RESULT
Pointer to the pr_MsgPort in the Process structure. Will return NULL on failure.

EXAMPLE

SEE ALSO
CreateNewProc(), LoadSeg(), UnLoadSeg()

NOTES
This will not free the seglist when the process finishes.

This does not return a pointer to the Process structure, but rather the MsgPort structure contained within it. You can get the real Process structure by:

struct Process *pr; struct MsgPort *mp;

mp = CreateProc(...); pr = (struct Process *)((struct Task *)mp - 1);

// Shouldn't use mp after this point

BUGS

INTERNALS
Basically passes this call to CreateNewProc().

HISTORY
06.02.1999 iaint
Might remove the compilation errors this time.
06.02.1999 iaint
A few dos.library functions, not tested.
23.10.1998 hkiel
Changes for use with aros_print_not_implemented() macro
20.10.1998 hkiel
Amiga Research OS
31.08.1998 hkiel
Added #warning for functions which are TODO
27.01.1997 ldp
Polish
09.12.1996 aros
Added empty templates for all missing functions

Moved #include's into first column