Lines Matching refs:stg
91 static void allocate(void*& stg)
100 stg = pkey;
103 static void deallocate(void* stg)
105 pthread_key_type* pkey = static_cast< pthread_key_type* >(stg);
110 static void set_value(void* stg, void* value)
112 const int res = pthread_setspecific(*static_cast< pthread_key_type* >(stg), value);
119 static void* get_value(void* stg)
121 return pthread_getspecific(*static_cast< pthread_key_type* >(stg));
144 static void allocate(void*& stg)
152 stg = (void*)(intptr_type)key;
155 static void deallocate(void* stg)
157 pthread_key_delete((pthread_key_type)(intptr_type)stg);
160 static void set_value(void* stg, void* value)
162 const int res = pthread_setspecific((pthread_key_type)(intptr_type)stg, value);
169 static void* get_value(void* stg)
171 return pthread_getspecific((pthread_key_type)(intptr_type)stg);
180 static void allocate(void*& stg)
188 std::memset(&stg, 0, sizeof(stg));
189 std::memcpy(&stg, &key, sizeof(pthread_key_type));
192 static void deallocate(void* stg)
195 std::memcpy(&key, &stg, sizeof(pthread_key_type));
199 static void set_value(void* stg, void* value)
202 std::memcpy(&key, &stg, sizeof(pthread_key_type));
210 static void* get_value(void* stg)
213 std::memcpy(&key, &stg, sizeof(pthread_key_type));
223 static void allocate(void*& stg)
231 stg = static_cast< void* >(key);
234 static void deallocate(void* stg)
236 pthread_key_delete(static_cast< pthread_key_type >(stg));
239 static void set_value(void* stg, void* value)
241 const int res = pthread_setspecific(static_cast< pthread_key_type >(stg), value);
248 static void* get_value(void* stg)
250 return pthread_getspecific(static_cast< pthread_key_type >(stg));