Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
43:53cd05892261 | 44:0e81ac0bb3e2 |
---|---|
1 | |
2 | |
3 #include <ngx_config.h> | |
4 | |
5 #include <ngx_log.h> | |
6 #include <ngx_pthread.h> | |
7 | |
8 | |
9 int ngx_create_os_thread(ngx_os_tid_t *tid, void *stack, | |
10 ngx_thread_start_routine_t func, void *arg, | |
11 ngx_log_t log) | |
12 { | |
13 int err; | |
14 pthread_attr_t *attr; | |
15 | |
16 attr = NULL; | |
17 | |
18 err = pthread_create(tid, attr, func, arg); | |
19 | |
20 if (err != 0) { | |
21 ngx_log_error(NGX_LOG_ERR, log, err, "pthread_create() failed"); | |
22 return NGX_ERROR; | |
23 } | |
24 | |
25 return NGX_OK; | |
26 } |