aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_thread.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-07-07 15:01:00 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-07-07 15:01:00 +0000
commit2b97993c7a6525bf41c694414450943d39605757 (patch)
treeb3b3870575cd65e64ef59de5359bfdd3695bc77c /src/os/unix/ngx_thread.h
parentc78c41cefcf1e1fa8005f81b7c6cc0c857bcf46f (diff)
downloadnginx-2b97993c7a6525bf41c694414450943d39605757.tar.gz
nginx-2b97993c7a6525bf41c694414450943d39605757.zip
nginx-0.0.7-2004-07-07-19:01:00 import
Diffstat (limited to 'src/os/unix/ngx_thread.h')
-rw-r--r--src/os/unix/ngx_thread.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h
index b9348e89d..eb5c33f85 100644
--- a/src/os/unix/ngx_thread.h
+++ b/src/os/unix/ngx_thread.h
@@ -16,20 +16,22 @@
#else /* use pthreads */
#include <pthread.h>
-#include <pthread_np.h>
-typedef pthread_t ngx_tid_t;
+typedef pthread_t ngx_tid_t;
-#define ngx_thread_self() pthread_self()
-#define ngx_log_tid (int) ngx_thread_self()
+#define ngx_thread_self() pthread_self()
+#define ngx_log_tid (int) ngx_thread_self()
-#define TID_T_FMT PTR_FMT
+#define TID_T_FMT PTR_FMT
-#define ngx_thread_create_tls() pthread_key_create(0, NULL)
-#define ngx_thread_create_tls_n "pthread_key_create(0, NULL)"
-#define ngx_thread_get_tls() pthread_getspecific(0)
-#define ngx_thread_set_tls(v) pthread_setspecific(0, v)
+typedef pthread_key_t ngx_tls_key_t;
+
+#define ngx_thread_key_create(key) pthread_key_create(key, NULL)
+#define ngx_thread_key_create_n "pthread_key_create()"
+#define ngx_thread_set_tls pthread_setspecific
+#define ngx_thread_set_tls_n "pthread_setspecific()"
+#define ngx_thread_get_tls pthread_getspecific
#define NGX_MUTEX_LIGHT 0
@@ -111,10 +113,5 @@ ngx_int_t ngx_cond_signal(ngx_cond_t *cv);
#endif
-typedef struct {
- ngx_event_t *event;
-} ngx_tls_t;
-
-
#endif /* _NGX_THREAD_H_INCLUDED_ */