Create a new process
Source position: amigados.pas line 2448
function CreateProc( |
const Name: PChar; |
Pri: LongInt; |
SegList: LongInt; |
StackSize: LongInt |
):PMsgPort; |
Name |
|
Name of Process |
Pri |
|
Priority for the process |
SegList |
|
Pointer to a seglist to run |
StackSize |
|
Initial Stacksize for the process |
Pointer to the new Process messageport or nil
CreateProc() creates a new process of name 'name'. Processes are a superset of exec tasks.
A seglist, as returned by LoadSeg(), is passed as 'seglist'. This represents a section of code which is to be run as a new process. The code is entered at the first hunk in the segment list, which should contain suitable initialization code or a jump to such. A process control structure is allocated from memory and initialized.
The size of the root stack upon activation is passed as 'stackSize'. 'pri' specifies the required priority of the new process. The result will be the process msgport address of the new process, or nil if the routine failed. The argument 'name' specifies the new process name. A nil return code indicates error.
The seglist passed to CreateProc() is not freed when it exits; it is up to the parent process to free it, or for the code to unload itself.
|
Create a new process from taglist |
|
|
Scatterload a loadable file into memory |
|
|
Unload a seglist previously loaded by LoadSeg() |