Back to index

php5  5.3.10
php_sysvsem.h
Go to the documentation of this file.
00001 /* 
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Tom May <tom@go2net.com>                                     |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: php_sysvsem.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_SYSVSEM_H
00022 #define PHP_SYSVSEM_H
00023 
00024 #if HAVE_SYSVSEM
00025 
00026 extern zend_module_entry sysvsem_module_entry;
00027 #define sysvsem_module_ptr &sysvsem_module_entry
00028 
00029 PHP_MINIT_FUNCTION(sysvsem);
00030 PHP_FUNCTION(sem_get);
00031 PHP_FUNCTION(sem_acquire);
00032 PHP_FUNCTION(sem_release);
00033 PHP_FUNCTION(sem_remove);
00034 
00035 typedef struct {
00036        int le_sem;
00037 } sysvsem_module;
00038 
00039 typedef struct {
00040        int id;                                          /* For error reporting. */
00041        int key;                                  /* For error reporting. */
00042        int semid;                                /* Returned by semget(). */
00043        int count;                                /* Acquire count for auto-release. */
00044        int auto_release;                  /* flag that says to auto-release. */
00045 } sysvsem_sem;
00046 
00047 extern sysvsem_module php_sysvsem_module;
00048 
00049 #else
00050 
00051 #define sysvsem_module_ptr NULL
00052 
00053 #endif
00054 
00055 #define phpext_sysvsem_ptr sysvsem_module_ptr
00056 
00057 #endif /* PHP_SYSVSEM_H */