[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'amigados' (#aros)


Create a new process


Source position: amigados.pas line 2267

function CreateProc(

  const Name: STRPTR;

  Pri: LongInt;

  SegList: BPTR;

  StackSize: LongInt





Name of Process



Priority for the process



Pointer to a seglist to run



Initial Stacksize for the process

Function result

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.

See also



Create a new process from taglist



Scatterload a loadable file into memory



Unload a seglist previously loaded by LoadSeg()

Documentation generated on: 2017-01-10