Mercurial > hg > nginx
diff src/os/unix/ngx_pthread.c @ 44:0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 09 Jan 2003 05:36:00 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/os/unix/ngx_pthread.c Thu Jan 09 05:36:00 2003 +0000 @@ -0,0 +1,26 @@ + + +#include <ngx_config.h> + +#include <ngx_log.h> +#include <ngx_pthread.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) +{ + 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; +}