aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_pthread.c')
-rw-r--r--src/os/unix/ngx_pthread.c26
1 files changed, 26 insertions, 0 deletions
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 <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;
+}