Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

AllocSignal

Allocate a signal bit

Declaration

Source position: exec.pas line 1796

function AllocSignal(

  SignalNum: LongInt

):ShortInt;

Arguments

SignalNum

  

The desired signal number (of [0..31]) or -1 for no preference.

Function result

The signal bit number allocated [0..31]. If no signals are available, this function returns -1.

Description

Allocate a signal bit from the current tasks' pool. Either a particular bit, or the next free bit may be allocated. The signal associated with the bit will be properly initialized (cleared). At least 16 user signals are available per task. Signals should be deallocated before the task exits.

If the signal is already in use (or no free signals are available) a -1 is returned.

Allocated signals are only valid for use with the task that allocated them.

WARNING

Signals may not be allocated or freed from exception handling code.

See also

FreeSignal

  

Free a signal bit


Documentation generated on: 2021-07-30