From 4e9393a0548d783cd6f50d1fcd003c85a24b2b16 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 9 Jan 2003 05:36:00 +0000 Subject: nginx-0.0.1-2003-01-09-08:36:00 import --- src/os/unix/ngx_pthread.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/os/unix/ngx_pthread.c (limited to 'src/os/unix/ngx_pthread.c') diff --git a/src/os/unix/ngx_pthread.c b/src/os/unix/ngx_pthread.c new file mode 100644 index 000000000..2491032a4 --- /dev/null +++ b/src/os/unix/ngx_pthread.c @@ -0,0 +1,26 @@ + + +#include + +#include +#include + + +int ngx_create_os_thread(ngx_os_tid_t *tid, void *stack, + ngx_thread_start_routine_t func, void *arg, + ngx_log_t log) +{ + int err; + pthread_attr_t *attr; + + attr = NULL; + + err = pthread_create(tid, attr, func, arg); + + if (err != 0) { + ngx_log_error(NGX_LOG_ERR, log, err, "pthread_create() failed"); + return NGX_ERROR; + } + + return NGX_OK; +} -- cgit v1.2.3