forked from tpunt/pht
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_pht.h
70 lines (57 loc) · 2.45 KB
/
php_pht.h
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
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-present The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Thomas Punt <[email protected]> |
+----------------------------------------------------------------------+
*/
#ifndef PHP_PHT_H
#define PHP_PHT_H
#include <Zend/zend_modules.h>
#include <Zend/zend_API.h>
extern zend_module_entry pht_module_entry;
#define phpext_pht_ptr &pht_module_entry
#define PHP_PHT_VERSION "0.0.1"
#ifndef ZTS
# error "ZTS is required"
#endif
ZEND_BEGIN_MODULE_GLOBALS(pht)
void ***parent_thread_ls;
HashTable op_array_file_names;
HashTable child_threads;
zend_bool skip_qoi_creation;
zend_bool skip_htoi_creation;
zend_bool skip_voi_creation;
zend_bool skip_aioi_creation;
ZEND_END_MODULE_GLOBALS(pht)
ZEND_EXTERN_MODULE_GLOBALS(pht)
typedef struct _common_strings_t {
zend_string *__construct;
zend_string *run;
zend_string *_THREAD;
zend_string *value;
zend_string *Queue;
zend_string *HashTable;
zend_string *Vector;
zend_string *AtomicInteger;
} common_strings_t;
extern common_strings_t common_strings;
#define PHT_ZG(v) ZEND_MODULE_GLOBALS_ACCESSOR(pht, v)
#define PHT_CTX(ls, id, type, element) (((type) (*((void ***) ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
#define PHT_EG(ls, v) PHT_CTX(ls, executor_globals_id, zend_executor_globals*, v)
#define PHT_CG(ls, v) PHT_CTX(ls, compiler_globals_id, zend_compiler_globals*, v)
#define PHT_SG(ls, v) PHT_CTX(ls, sapi_globals_id, sapi_globals_struct*, v)
#if defined(ZTS) && defined(COMPILE_DL_PHT)
ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif