Mercurial > hg > nginx
view src/os/win32/ngx_thread.c @ 6860:f18c285c2e59
Win32: fixed some warnings reported by Borland C.
Most notably, warning W8012 (comparing signed and unsigned values) reported
in multiple places where an unsigned value of small type (e.g., u_short) is
promoted to an int and compared to an unsigned value.
Warning W8072 (suspicious pointer arithmetic) disabled, it is reported
when we increment base pointer in ngx_shm_alloc().
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 24 Dec 2016 18:01:14 +0300 |
parents | 537259db5af4 |
children |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> ngx_err_t ngx_create_thread(ngx_tid_t *tid, ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log) { u_long id; ngx_err_t err; *tid = CreateThread(NULL, 0, func, arg, 0, &id); if (*tid != NULL) { ngx_log_error(NGX_LOG_NOTICE, log, 0, "create thread " NGX_TID_T_FMT, id); return 0; } err = ngx_errno; ngx_log_error(NGX_LOG_ALERT, log, err, "CreateThread() failed"); return err; }