Back to index

php5  5.3.10
php_shmop.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    | Authors: Slava Poliakov <hackie@prohost.org>                         |
00016    |          Ilia Alshanetsky <ilia@prohost.org>                         |
00017    +----------------------------------------------------------------------+
00018  */
00019 #ifndef PHP_SHMOP_H
00020 #define PHP_SHMOP_H
00021 
00022 #if HAVE_SHMOP
00023 
00024 extern zend_module_entry shmop_module_entry;
00025 #define phpext_shmop_ptr &shmop_module_entry
00026 
00027 PHP_MINIT_FUNCTION(shmop);
00028 PHP_MINFO_FUNCTION(shmop);
00029 
00030 PHP_FUNCTION(shmop_open);
00031 PHP_FUNCTION(shmop_read);
00032 PHP_FUNCTION(shmop_close);
00033 PHP_FUNCTION(shmop_size);
00034 PHP_FUNCTION(shmop_write);
00035 PHP_FUNCTION(shmop_delete);
00036 
00037 #ifdef PHP_WIN32
00038 typedef int key_t;
00039 #endif
00040 
00041 struct php_shmop
00042 {
00043        int shmid;
00044        key_t key;
00045        int shmflg;
00046        int shmatflg;
00047        char *addr;
00048        int size;
00049 };
00050 
00051 typedef struct {
00052        int le_shmop;
00053 } php_shmop_globals;
00054 
00055 #ifdef ZTS
00056 #define SHMOPG(v) TSRMG(shmop_globals_id, php_shmop_globals *, v)
00057 #else
00058 #define SHMOPG(v) (shmop_globals.v)
00059 #endif
00060 
00061 #else
00062 
00063 #define phpext_shmop_ptr NULL
00064 
00065 #endif
00066 
00067 #endif /* PHP_SHMOP_H */
00068 
00069 
00070 /*
00071  * Local variables:
00072  * tab-width: 4
00073  * c-basic-offset: 4
00074  * End:
00075  */