★ wanayoo — archive 1999 http://il.php.net/manual/function.sem-get.php3Nouvelle recherche | Portail wanayoo

PHP3 Home Page

Manual Table of Contents
Up to Semaphore
Quick Reference
Semaphore
* sem_get
* sem_acquire
* sem_release
* shm_attach
* shm_detach
* shm_remove
* shm_put_var
* shm_get_var
* shm_remove_var
Manual: sem_get
View the source code for this pageSearch the site



Previous page
 Semaphore
sem_acquire 
Next page


sem_get

sem_get -- get a semaphore id

Description

int sem_get(int key, int [max_acquire] , int [perm] );

Returns: A positive semaphore identifier on success, or false on error.

sem_get() returns an id that can be used to access the System V semaphore with the given key. The semaphore is created if necessary using the permission bits specified in perm (defaults to 0666). The number of processes that can acquire the semaphore simultaneously is set to max_acquire (defaults to 1). Actually this value is set only if the process finds it is the only process currently attached to the semaphore.

A second call to sem_get() for the same key will return a different semaphore identifier, but both identifiers access the same underlying semaphore.

See also: sem_acquire() and sem_release().


 About Notes


Previous page
 Semaphore
sem_acquire 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
Israel
Some elements of this website are subject to copyright.