@@ -81,6 +81,7 @@ macro_rules! __scoped_thread_local_inner {
81
81
#[ cfg_attr( not( any( windows,
82
82
target_os = "android" ,
83
83
target_os = "ios" ,
84
+ target_os = "openbsd" ,
84
85
target_arch = "aarch64" ) ) ,
85
86
thread_local) ]
86
87
static $name: :: std:: thread_local:: scoped:: Key <$t> =
@@ -90,6 +91,7 @@ macro_rules! __scoped_thread_local_inner {
90
91
#[ cfg_attr( not( any( windows,
91
92
target_os = "android" ,
92
93
target_os = "ios" ,
94
+ target_os = "openbsd" ,
93
95
target_arch = "aarch64" ) ) ,
94
96
thread_local) ]
95
97
pub static $name: :: std:: thread_local:: scoped:: Key <$t> =
@@ -98,14 +100,22 @@ macro_rules! __scoped_thread_local_inner {
98
100
( $t: ty) => ( {
99
101
use std:: thread_local:: scoped:: Key as __Key;
100
102
101
- #[ cfg( not( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ) ]
103
+ #[ cfg( not( any( windows,
104
+ target_os = "android" ,
105
+ target_os = "ios" ,
106
+ target_os = "openbsd" ,
107
+ target_arch = "aarch64" ) ) ) ]
102
108
const _INIT: __Key<$t> = __Key {
103
109
inner: :: std:: thread_local:: scoped:: __impl:: KeyInner {
104
110
inner: :: std:: cell:: UnsafeCell { value: 0 as * mut _ } ,
105
111
}
106
112
} ;
107
113
108
- #[ cfg( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ]
114
+ #[ cfg( any( windows,
115
+ target_os = "android" ,
116
+ target_os = "ios" ,
117
+ target_os = "openbsd" ,
118
+ target_arch = "aarch64" ) ) ]
109
119
const _INIT: __Key<$t> = __Key {
110
120
inner: :: std:: thread_local:: scoped:: __impl:: KeyInner {
111
121
inner: :: std:: thread_local:: scoped:: __impl:: OS_INIT ,
@@ -205,7 +215,11 @@ impl<T> Key<T> {
205
215
}
206
216
}
207
217
208
- #[ cfg( not( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ) ]
218
+ #[ cfg( not( any( windows,
219
+ target_os = "android" ,
220
+ target_os = "ios" ,
221
+ target_os = "openbsd" ,
222
+ target_arch = "aarch64" ) ) ) ]
209
223
mod imp {
210
224
use std:: cell:: UnsafeCell ;
211
225
@@ -223,7 +237,11 @@ mod imp {
223
237
}
224
238
}
225
239
226
- #[ cfg( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ]
240
+ #[ cfg( any( windows,
241
+ target_os = "android" ,
242
+ target_os = "ios" ,
243
+ target_os = "openbsd" ,
244
+ target_arch = "aarch64" ) ) ]
227
245
mod imp {
228
246
use marker;
229
247
use sys_common:: thread_local:: StaticKey as OsStaticKey ;
0 commit comments