summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_builtin_functions.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index fdc9c49f9b..2c2fedd871 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -70,6 +70,7 @@ static ZEND_FUNCTION(get_defined_constants);
static ZEND_FUNCTION(debug_backtrace);
#if ZEND_DEBUG
static ZEND_FUNCTION(zend_test_func);
+static ZEND_FUNCTION(zend_thread_id);
#endif
ZEND_API unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
@@ -124,6 +125,7 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(debug_backtrace, NULL)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
+ ZEND_FE(zend_thread_id, NULL)
#endif
{ NULL, NULL, NULL }
};
@@ -1180,6 +1182,12 @@ ZEND_FUNCTION(zend_test_func)
zend_get_parameters(ht, 2, &arg1, &arg2);
}
+
+
+ZEND_FUNCTION(zend_thread_id)
+{
+ RETURN_LONG(tsrm_thread_id());
+}
#endif
/* {{{ proto string get_resource_type(resource res)