nxt_port_memory.c (723:c48e0ee3a8b3) nxt_port_memory.c (743:e0f0cd7d244a)
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

250 nxt_thread_mutex_unlock(&process->incoming.mutex);
251
252 return mmap_handler;
253}
254
255
256static nxt_port_mmap_handler_t *
257nxt_port_new_port_mmap(nxt_task_t *task, nxt_process_t *process,
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

250 nxt_thread_mutex_unlock(&process->incoming.mutex);
251
252 return mmap_handler;
253}
254
255
256static nxt_port_mmap_handler_t *
257nxt_port_new_port_mmap(nxt_task_t *task, nxt_process_t *process,
258 nxt_port_t *port, nxt_int_t n, nxt_bool_t tracking)
258 nxt_port_t *port, nxt_bool_t tracking, nxt_int_t n)
259{
260 void *mem;
261 u_char *p, name[64];
262 nxt_fd_t fd;
263 nxt_int_t i;
264 nxt_free_map_t *free_map;
265 nxt_port_mmap_t *port_mmap;
266 nxt_port_mmap_header_t *hdr;

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

454 goto unlock_return;
455 }
456 }
457 }
458
459 /* TODO introduce port_mmap limit and release wait. */
460
461 *c = 0;
259{
260 void *mem;
261 u_char *p, name[64];
262 nxt_fd_t fd;
263 nxt_int_t i;
264 nxt_free_map_t *free_map;
265 nxt_port_mmap_t *port_mmap;
266 nxt_port_mmap_header_t *hdr;

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

454 goto unlock_return;
455 }
456 }
457 }
458
459 /* TODO introduce port_mmap limit and release wait. */
460
461 *c = 0;
462 mmap_handler = nxt_port_new_port_mmap(task, process, port, n, tracking);
462 mmap_handler = nxt_port_new_port_mmap(task, process, port, tracking, n);
463
464unlock_return:
465
466 nxt_thread_mutex_unlock(&process->outgoing.mutex);
467
468 return mmap_handler;
469}
470

--- 484 unchanged lines hidden ---
463
464unlock_return:
465
466 nxt_thread_mutex_unlock(&process->outgoing.mutex);
467
468 return mmap_handler;
469}
470

--- 484 unchanged lines hidden ---