-
Notifications
You must be signed in to change notification settings - Fork 7
/
sysvsem.php
71 lines (65 loc) · 2.17 KB
/
sysvsem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
// Start of sysvsem v.7.0.4-7ubuntu2
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Get a semaphore id
* @link http://php.net/manual/en/function.sem-get.php
* @param int $key
* @param int $max_acquire [optional] <p>
* The number of processes that can acquire the semaphore simultaneously
* is set to <i>max_acquire</i>.
* </p>
* @param int $perm [optional] <p>
* The semaphore permissions. Actually this value is
* set only if the process finds it is the only process currently
* attached to the semaphore.
* </p>
* @param int $auto_release [optional] <p>
* Specifies if the semaphore should be automatically released on request
* shutdown.
* </p>
* @return resource a positive semaphore identifier on success, or <b>FALSE</b> on
* error.
*/
function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Acquire a semaphore
* @link http://php.net/manual/en/function.sem-acquire.php
* @param resource $sem_identifier <p>
* <i>sem_identifier</i> is a semaphore resource,
* obtained from <b>sem_get</b>.
* </p>
* @param bool $nowait [optional] <p>
* Specifies if the process shouldn't wait for the semaphore to be acquired.
* If set to true, the call will return
* false immediately if a semaphore cannot be immediately
* acquired.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function sem_acquire($sem_identifier, bool $nowait = false): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Release a semaphore
* @link http://php.net/manual/en/function.sem-release.php
* @param resource $sem_identifier <p>
* A Semaphore resource handle as returned by
* <b>sem_get</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function sem_release($sem_identifier): bool {}
/**
* (PHP 4 >= 4.1.0, PHP 5, PHP 7)<br/>
* Remove a semaphore
* @link http://php.net/manual/en/function.sem-remove.php
* @param resource $sem_identifier <p>
* A semaphore resource identifier as returned
* by <b>sem_get</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function sem_remove($sem_identifier): bool {}
// End of sysvsem v.7.0.4-7ubuntu2
?>