nxt_unit_app_test.c (1710:e598cd15bd91) nxt_unit_app_test.c (1980:43553aa72111)
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_unit.h>
7#include <nxt_unit_request.h>
8#include <nxt_clang.h>

--- 83 unchanged lines hidden (view full) ---

92
93static int
94ready_handler(nxt_unit_ctx_t *ctx)
95{
96 int i, err;
97
98 nxt_unit_debug(ctx, "ready");
99
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_unit.h>
7#include <nxt_unit_request.h>
8#include <nxt_clang.h>

--- 83 unchanged lines hidden (view full) ---

92
93static int
94ready_handler(nxt_unit_ctx_t *ctx)
95{
96 int i, err;
97
98 nxt_unit_debug(ctx, "ready");
99
100 if (!nxt_unit_is_main_ctx(ctx) || thread_count <= 1) {
100 if (thread_count <= 1) {
101 return NXT_UNIT_OK;
102 }
103
104 threads = nxt_unit_malloc(ctx, sizeof(pthread_t) * (thread_count - 1));
105 if (threads == NULL) {
106 return NXT_UNIT_ERROR;
107 }
108

--- 173 unchanged lines hidden ---
101 return NXT_UNIT_OK;
102 }
103
104 threads = nxt_unit_malloc(ctx, sizeof(pthread_t) * (thread_count - 1));
105 if (threads == NULL) {
106 return NXT_UNIT_ERROR;
107 }
108

--- 173 unchanged lines hidden ---