summaryrefslogtreecommitdiffstats
path: root/2383.patch
blob: 04716bd3aa82ade89f1abc6e69d0f9b3d60aa148 (plain)
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
From e1db8a922682e3979cb6a67e1af0a778a921c5d0 Mon Sep 17 00:00:00 2001
From: Gustavo Lopes <mail@geleia.net>
Date: Tue, 21 Nov 2023 17:39:48 +0000
Subject: [PATCH] Use global-dynamic for tsrm cache

---
 ext/ddtrace.h                          | 6 +++---
 ext/handlers_api.h                     | 6 +++---
 zend_abstract_interface/tsrmls_cache.h | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ext/ddtrace.h b/ext/ddtrace.h
index d7072328f9..6322ac78e1 100644
--- a/ext/ddtrace.h
+++ b/ext/ddtrace.h
@@ -108,11 +108,11 @@ ZEND_END_MODULE_GLOBALS(ddtrace)
 
 #ifdef ZTS
 #  if defined(__has_attribute) && __has_attribute(tls_model)
-#    define ATTR_TLS_LOCAL_DYNAMIC __attribute__((tls_model("local-dynamic")))
+#    define ATTR_TLS_GLOBAL_DYNAMIC __attribute__((tls_model("global-dynamic")))
 #  else
-#    define ATTR_TLS_LOCAL_DYNAMIC
+#    define ATTR_TLS_GLOBAL_DYNAMIC
 #  endif
-extern __thread void *ATTR_TLS_LOCAL_DYNAMIC TSRMLS_CACHE;
+extern __thread void *ATTR_TLS_GLOBAL_DYNAMIC TSRMLS_CACHE;
 #  define DDTRACE_G(v) TSRMG(ddtrace_globals_id, zend_ddtrace_globals *, v)
 #else
 #  define DDTRACE_G(v) (ddtrace_globals.v)
diff --git a/ext/handlers_api.h b/ext/handlers_api.h
index 353183bef1..bdd73e7559 100644
--- a/ext/handlers_api.h
+++ b/ext/handlers_api.h
@@ -8,12 +8,12 @@
 #if PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80101 && defined(ZTS)
 
 #  if defined(__has_attribute) && __has_attribute(tls_model)
-#    define ATTR_TLS_LOCAL_DYNAMIC __attribute__((tls_model("local-dynamic")))
+#    define ATTR_TLS_GLOBAL_DYNAMIC __attribute__((tls_model("global-dynamic")))
 #  else
-#    define ATTR_TLS_LOCAL_DYNAMIC
+#    define ATTR_TLS_GLOBAL_DYNAMIC
 #  endif
 
-extern __thread void *ATTR_TLS_LOCAL_DYNAMIC TSRMLS_CACHE;
+extern __thread void *ATTR_TLS_GLOBAL_DYNAMIC TSRMLS_CACHE;
 #endif
 
 typedef struct datadog_php_zif_handler_s {
diff --git a/zend_abstract_interface/tsrmls_cache.h b/zend_abstract_interface/tsrmls_cache.h
index a703909f58..2d86e89d62 100644
--- a/zend_abstract_interface/tsrmls_cache.h
+++ b/zend_abstract_interface/tsrmls_cache.h
@@ -5,10 +5,10 @@
 #if PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80101 && defined(ZTS)
 
 #  if defined(__has_attribute) && __has_attribute(tls_model)
-#    define ATTR_TLS_LOCAL_DYNAMIC __attribute__((tls_model("local-dynamic")))
+#    define ATTR_TLS_GLOBAL_DYNAMIC __attribute__((tls_model("global-dynamic")))
 #  else
-#    define ATTR_TLS_LOCAL_DYNAMIC
+#    define ATTR_TLS_GLOBAL_DYNAMIC
 #  endif
 
-extern __thread void *ATTR_TLS_LOCAL_DYNAMIC TSRMLS_CACHE;
+extern __thread void *ATTR_TLS_GLOBAL_DYNAMIC TSRMLS_CACHE;
 #endif