Please enable JavaScript to view this site.

Useful function for constructing an atomic semaphore.

Syntax

i32 mt_ats2 (i32 var [, i32 value=1])

var

Variable used as a semaphore

value

Value to be imposed (optional, default 1).

Use value<>0 to get the semaphore, value=0 to release the semaphore

Result

 

Returns:

Value

Meaning

<> 0

Semaphore already busy.

Represents the value of the variable from the previous entry

0

Semaphore free and properly used by the function

Validity

Rule, Task

Note


 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC