Opens and optionally creates named semaphore. The given name
shall not start with a leading /.
The function returns the following error codes:
E_INVALID if name is empty or starts with /, or if value is negative.E_SYSTEM if system call to open semaphore failed.| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sem_named_type), | intent(inout) | :: | sem |
Semaphore type. |
||
| character(len=*), | intent(in) | :: | name |
Semaphore name (without leading |
||
| integer, | intent(in), | optional | :: | value |
Initial value. |
|
| logical, | intent(in), | optional | :: | create |
Create semaphore. |
|
| integer, | intent(in), | optional | :: | mode |
Permissions. |