Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ngx_os_thread.c « win32 « os « src - github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9d540cc186713e1461a6cd4094d0d277429e8ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26


#include <ngx_config.h>

#include <ngx_log.h>
#include <ngx_os_thread.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)
{
    ngx_os_tid_t  id;
    int  dummy;       /* needed in Win9X only, in NT can be NULL */

    id = CreateThread(NULL, stack_size, func, arg, 0, &dummy);

    if (id == NULL) {
        ngx_log_error(NGX_LOG_ERR, log, err, "CreateThread() failed");
        return NGX_ERROR;
    }

    *tid = id;

    return NGX_OK;
}