+int
+pthread_introspection_setspecific_np(pthread_t thread,
+ pthread_key_t key, const void *value)
+{
+ pthread_t self = _pthread_self();
+ if (os_unlikely(self->introspection != PTHREAD_INTROSPECTION_THREAD_CREATE)) {
+ PTHREAD_CLIENT_CRASH(0, "Calling pthread_introspection_setspecific_np "
+ "outside of a CREATE introspection hook");
+ }
+ return _pthread_setspecific(thread, key, value);
+
+}
+
+void *
+pthread_introspection_getspecific_np(pthread_t thread, pthread_key_t key)
+{
+ pthread_t self = _pthread_self();
+ if (os_unlikely(self->introspection != PTHREAD_INTROSPECTION_THREAD_DESTROY)) {
+ PTHREAD_CLIENT_CRASH(0, "Calling pthread_introspection_getspecific_np "
+ "outside of a DESTROY introspection hook");
+ }
+ return thread->tsd[key];
+}
+