-
Notifications
You must be signed in to change notification settings - Fork 0
/
counterlock.php
61 lines (53 loc) · 1.42 KB
/
counterlock.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
<?php
// Start of counterlock.
/**
* Get or create a semaphore counter id
*
* @param int $key
* @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>
*
* @return resource a positive counter identifier on success, or <b>FALSE</b> on
* error.
*/
function counter_create ($key, $perm = 0666) {}
/**
* Increment a counter
* @param resource $resource <p>
* <i>resource</i> is a resource, obtained from <b>counter_create</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function counter_increment ($resource) {}
/**
* Increment a counter
* @param resource $resource <p>
* A resource handle as returned by
* <b>counter_create</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function counter_decrement ($resource) {}
/**
* Get counter value.
*
* @param resource $resource <p>
* A resource handle as returned by
* <b>counter_create</b>.
* </p>
* @return integer|false <b>FALSE</b> on failure.
*/
function counter_value ($resource) {}
/**
* Remove a System V semaphore for counter
* @param resource $resource <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 counter_remove ($resource) {}
// End of counterlock.