aboutsummaryrefslogtreecommitdiff
path: root/src/os/win32/ngx_os_thread.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-01-09 05:36:00 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-01-09 05:36:00 +0000
commit4e9393a0548d783cd6f50d1fcd003c85a24b2b16 (patch)
tree300b40876e7ea6c103b7a080e380cdaaaf31260e /src/os/win32/ngx_os_thread.c
parentc1817846d29be14903e40a0551f706ff50e09dcf (diff)
downloadnginx-4e9393a0548d783cd6f50d1fcd003c85a24b2b16.tar.gz
nginx-4e9393a0548d783cd6f50d1fcd003c85a24b2b16.zip
nginx-0.0.1-2003-01-09-08:36:00 import
Diffstat (limited to 'src/os/win32/ngx_os_thread.c')
-rw-r--r--src/os/win32/ngx_os_thread.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/os/win32/ngx_os_thread.c b/src/os/win32/ngx_os_thread.c
new file mode 100644
index 000000000..c9d540cc1
--- /dev/null
+++ b/src/os/win32/ngx_os_thread.c
@@ -0,0 +1,26 @@
+
+
+#include <ngx_config.h>
+
+#include <ngx_log.h>
+#include <ngx_os_thread.h>
+
+
+int ngx_create_os_thread(ngx_os_tid_t *tid, void *stack,
+ ngx_thread_start_routine_t func, void *arg,
+ ngx_log_t log)
+{
+ ngx_os_tid_t id;
+ int dummy; /* needed in Win9X only, in NT can be NULL */
+
+ id = CreateThread(NULL, stack_size, func, arg, 0, &dummy);
+
+ if (id == NULL) {
+ ngx_log_error(NGX_LOG_ERR, log, err, "CreateThread() failed");
+ return NGX_ERROR;
+ }
+
+ *tid = id;
+
+ return NGX_OK;
+}