[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'System' (#rtl)

SemaphoreInit

Create a new semaphore

Declaration

Source position: threadh.inc line 178

function SemaphoreInit: Pointer;

Description

SemaphoreInit creates a new semaphore, which can be used in thread synchronization. The semaphore can be used with SemaphoreWait and SemaphorePost, and must be destroyed with SemaphoreDestroy.

The result is an untyped pointer (thread support is platform dependent).

The use of semaphores requires thread support (use #rtl.cthreads unit on unices).

Errors

On error, Pointer(-1) is returned. If no thread support is compiled in, then calling this function will result in a run-time error 232.

See also

#rtl.cthreads

  

Initialize the thread manager with a POSIX thread manager

SemaphoreWait

  

Wait for semaphore to become available

SemaphorePost

  

Make semaphore available

SemaphoreDestroy

  

Destroy a semaphore


Documentation generated on: Sep 28 2017