Repository navigation
Expand file tree
/
Copy pathphp_winsystem.c
More file actions
108 lines (95 loc) · 3.29 KB
/
Copy pathphp_winsystem.c
File metadata and controls
108 lines (95 loc) · 3.29 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2012 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 |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Elizabeth Smith <auroraeosrose@gmail.com> |
+----------------------------------------------------------------------+
*/
#include "php_winsystem.h"
ZEND_DECLARE_MODULE_GLOBALS(winsystem);
/* ----------------------------------------------------------------
\Win\System LifeCycle Functions
------------------------------------------------------------------*/
PHP_MINIT_FUNCTION(winsystem)
{
/* basics */
PHP_MINIT(winsystem_enum)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_codepage)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_unicode)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_exceptions)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_waitable)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_mutex)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_semaphore)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_event)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_timer)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(winsystem_registry)(INIT_FUNC_ARGS_PASSTHRU);
#ifdef ZTS
PHP_MINIT(winsystem_thread)(INIT_FUNC_ARGS_PASSTHRU);
#endif
return SUCCESS;
}
/* Free thread stuff if needed */
PHP_MSHUTDOWN_FUNCTION(winsystem)
{
#ifdef ZTS
PHP_MSHUTDOWN(winsystem_thread)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
ts_free_id(winsystem_globals_id);
#endif
return SUCCESS;
}
/* initialize the thread list */
PHP_RINIT_FUNCTION(winsystem)
{
#ifdef ZTS
PHP_RINIT(winsystem_thread)(INIT_FUNC_ARGS_PASSTHRU);
#endif
return SUCCESS;
}
/* }}} */
/* Free thread stuff if needed - will call the thread callbacks so we wait on them to finish */
PHP_RSHUTDOWN_FUNCTION(winsystem)
{
#ifdef ZTS
PHP_RSHUTDOWN(winsystem_thread)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
#endif
return SUCCESS;
}
/* Module entry for winsystem */
zend_module_entry winsystem_module_entry = {
STANDARD_MODULE_HEADER,
"winsystem",
NULL,
PHP_MINIT(winsystem),
PHP_MSHUTDOWN(winsystem),
PHP_RINIT(winsystem),
PHP_RSHUTDOWN(winsystem),
NULL,
PHP_WINSYSTEM_VERSION,
PHP_MODULE_GLOBALS(winsystem),
NULL,
NULL,
NULL,
STANDARD_MODULE_PROPERTIES_EX
};
/* Required for dynamic linking */
#ifdef COMPILE_DL_WINSYSTEM
ZEND_GET_MODULE(winsystem)
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/