Allocate a processor trap vector
Source position: exec.pas line 1268
function AllocTrap( |
TrapNum: LongInt |
):LongInt; |
TrapNum |
|
the desired trap number [0..15] or -1 for no preference. |
The trap number allocated [0..15]. If no traps are available, this function returns -1.
Allocate a trap number from the current task's pool. These trap numbers are those associated with the 68000 TRAP type instructions. Either a particular number, or the next free number may be allocated.
If the trap is already in use (or no free traps are available) a -1 is returned.
This function only affects the currently running task.
Traps are sent to the trap handler pointed at by tc_TrapCode. Unless changed by user code, this points to a standard trap handler.
tc_TrapData is not used.
WARNING
Traps may not be allocated or freed from exception handling code. You are not allowed to write to the exception table yourself.
|
Free a processor trap |