Mercurial > hg > nginx
comparison src/os/win32/ngx_thread.c @ 461:a88a3e4e158f release-0.1.5
nginx-0.1.5-RELEASE import
*) Bugfix: on Solaris and Linux there may be too many "recvmsg()
returned not enough data" alerts.
*) Bugfix: there were the "writev() failed (22: Invalid argument)"
errors on Solaris in proxy mode without sendfile. On other platforms
that do not support sendfile at all the process got caught in an
endless loop.
*) Bugfix: segmentation fault on Solaris in proxy mode and using
sendfile.
*) Bugfix: segmentation fault on Solaris.
*) Bugfix: on-line upgrade did not work on Linux.
*) Bugfix: the ngx_http_autoindex_module module did not escape the
spaces, the quotes, and the percent signs in the directory listing.
*) Change: the decrease of the copy operations.
*) Feature: the userid_p3p directive.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 14:07:14 +0000 |
parents | |
children | d4ea69372b94 |
comparison
equal
deleted
inserted
replaced
460:5f8319142dfc | 461:a88a3e4e158f |
---|---|
1 | |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <ngx_config.h> | |
8 #include <ngx_core.h> | |
9 | |
10 | |
11 ngx_int_t ngx_threads_n; | |
12 | |
13 | |
14 static size_t stack_size; | |
15 | |
16 | |
17 ngx_err_t ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg), void *arg, | |
18 ngx_log_t *log) | |
19 { | |
20 ngx_err_t err; | |
21 | |
22 *tid = CreateThread(NULL, stack_size, | |
23 (LPTHREAD_START_ROUTINE) func, arg, 0, NULL); | |
24 | |
25 if (*tid != NULL) { | |
26 return 0; | |
27 } | |
28 | |
29 err = ngx_errno; | |
30 ngx_log_error(NGX_LOG_ALERT, log, err, "CreateThread() failed"); | |
31 return err; | |
32 } | |
33 | |
34 | |
35 ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle) | |
36 { | |
37 stack_size = size; | |
38 | |
39 return NGX_OK; | |
40 } | |
41 | |
42 | |
43 ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key) | |
44 { | |
45 *key = TlsAlloc(); | |
46 | |
47 if (*key == TLS_OUT_OF_INDEXES) { | |
48 return ngx_errno; | |
49 } | |
50 | |
51 return 0; | |
52 } | |
53 | |
54 | |
55 ngx_err_t ngx_thread_set_tls(ngx_tls_key_t *key, void *data) | |
56 { | |
57 if (TlsSetValue(*key, data) == 0) { | |
58 return ngx_errno; | |
59 } | |
60 | |
61 return 0; | |
62 } | |
63 | |
64 | |
65 ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags) | |
66 { | |
67 return (ngx_mutex_t *) 1; | |
68 } |