\"\" \"\" \"\"
Go backward to rt_yield(): Descheduling a Thread
Go up to Miscellaneous
Go forward to rt_gc(): Triggering Garbage Collection
RISC-Linz logo

rt_lock(): Locking a Process

rt_lock()
rt_unlock()

Specification: The first form switches off preemption of the current process i.e. the process is going to execute no other thread than the current one. The second form switches on preemption again.

Constraint: No RT++ object may be constructed while preemption is switched off and no thread may be created during that time. Furthermore, the thread must neither terminate nor wait for the result of another thread while preemption is switched off.

Note: This operation may be used to switch off preemption during output operations.

Implementation: Garbage collection cannot be performed while preemption is switched off on any process.


Author: Wolfgang Schreiner
Last Modification: April 12, 1997