Mercurial > hg > nginx
annotate src/os/win32/ngx_thread.h @ 2755:a65976a205a5
add quotes for configure options with spaces
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 26 Apr 2009 19:37:38 +0000 |
parents | 9c2f3ed7a247 |
children | d620f497c50f |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
6 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_THREAD_H_INCLUDED_ |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_THREAD_H_INCLUDED_ |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 #include <ngx_config.h> |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 #include <ngx_core.h> |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
461 | 15 typedef HANDLE ngx_tid_t; |
16 typedef DWORD ngx_tls_key_t; | |
563 | 17 typedef DWORD ngx_thread_value_t; |
461 | 18 |
19 | |
20 typedef struct { | |
21 HANDLE mutex; | |
22 ngx_log_t *log; | |
23 } ngx_mutex_t; | |
24 | |
25 | |
563 | 26 ngx_err_t ngx_create_thread(ngx_tid_t *tid, |
27 ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log); | |
461 | 28 ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle); |
29 | |
30 ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key); | |
31 #define ngx_thread_key_create_n "TlsAlloc()" | |
32 ngx_err_t ngx_thread_set_tls(ngx_tls_key_t *key, void *data); | |
33 #define ngx_thread_set_tls_n "TlsSetValue()" | |
34 #define ngx_thread_get_tls TlsGetValue | |
35 | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 #define ngx_thread_volatile volatile |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 |
461 | 39 #define ngx_log_tid GetCurrentThreadId() |
40 #define NGX_TID_T_FMT "%ud" | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
41 |
461 | 42 |
43 ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags); | |
44 | |
563 | 45 void ngx_mutex_lock(ngx_mutex_t *m); |
501 | 46 ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m); |
563 | 47 void ngx_mutex_unlock(ngx_mutex_t *m); |
501 | 48 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
49 |
461 | 50 /* STUB */ |
51 #define NGX_MUTEX_LIGHT 0 | |
501 | 52 /**/ |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
53 |
461 | 54 |
55 extern ngx_int_t ngx_threads_n; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
56 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
57 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
58 #endif /* _NGX_THREAD_H_INCLUDED_ */ |