Deleted
Added
nxt_lib.c (20:4dc92b438f58) | nxt_lib.c (138:59fc46dd5e1d) |
---|---|
1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8 9 10nxt_uint_t nxt_ncpu = 1; 11nxt_uint_t nxt_pagesize; 12nxt_task_t nxt_main_task; 13nxt_atomic_t nxt_task_ident; | 1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8 9 10nxt_uint_t nxt_ncpu = 1; 11nxt_uint_t nxt_pagesize; 12nxt_task_t nxt_main_task; 13nxt_atomic_t nxt_task_ident; |
14nxt_random_t nxt_random_data; | |
15 16nxt_thread_declare_data(nxt_thread_t, nxt_thread_context); 17 18 19#if (NXT_DEBUG && NXT_FREEBSD) 20/* 21 * Fill memory with 0xA5 after malloc() and with 0x5A before free(). 22 * malloc() options variable has to override the libc symbol, otherwise --- 72 unchanged lines hidden (view full) --- 95 nxt_debug(&nxt_main_task, "ncpu: %ui", n); 96 97 if (n > 1) { 98 nxt_ncpu = n; 99 } 100 101 nxt_thread_spin_init(nxt_ncpu, 0); 102 | 14 15nxt_thread_declare_data(nxt_thread_t, nxt_thread_context); 16 17 18#if (NXT_DEBUG && NXT_FREEBSD) 19/* 20 * Fill memory with 0xA5 after malloc() and with 0x5A before free(). 21 * malloc() options variable has to override the libc symbol, otherwise --- 72 unchanged lines hidden (view full) --- 94 nxt_debug(&nxt_main_task, "ncpu: %ui", n); 95 96 if (n > 1) { 97 nxt_ncpu = n; 98 } 99 100 nxt_thread_spin_init(nxt_ncpu, 0); 101 |
103 nxt_random_init(&nxt_random_data); | 102 nxt_random_init(&thread->random); |
104 105 nxt_pagesize = getpagesize(); 106 107 nxt_debug(&nxt_main_task, "pagesize: %ui", nxt_pagesize); 108 109 if (argv != NULL) { 110 update = (argv[0] == app); 111 --- 42 unchanged lines hidden --- | 103 104 nxt_pagesize = getpagesize(); 105 106 nxt_debug(&nxt_main_task, "pagesize: %ui", nxt_pagesize); 107 108 if (argv != NULL) { 109 update = (argv[0] == app); 110 --- 42 unchanged lines hidden --- |