nxt_event_engine.c (1267:74acbd89400a) nxt_event_engine.c (1269:41331471eee7)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

716 nxt_event_engine_mem_free(engine, b->cache_hint, b, size);
717}
718
719
720void
721nxt_event_engine_buf_mem_completion(nxt_task_t *task, void *obj, void *data)
722{
723 nxt_event_engine_t *engine;
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

716 nxt_event_engine_mem_free(engine, b->cache_hint, b, size);
717}
718
719
720void
721nxt_event_engine_buf_mem_completion(nxt_task_t *task, void *obj, void *data)
722{
723 nxt_event_engine_t *engine;
724 nxt_buf_t *b, *parent;
724 nxt_buf_t *b, *next, *parent;
725
726 b = obj;
727 parent = data;
728
729 nxt_debug(task, "buf completion: %p %p", b, b->mem.start);
730
731 engine = b->data;
725
726 b = obj;
727 parent = data;
728
729 nxt_debug(task, "buf completion: %p %p", b, b->mem.start);
730
731 engine = b->data;
732 nxt_event_engine_buf_mem_free(engine, b);
733
732
734 nxt_buf_parent_completion(task, parent);
733 do {
734 next = b->next;
735 parent = b->parent;
736
737 nxt_event_engine_buf_mem_free(engine, b);
738
739 nxt_buf_parent_completion(task, parent);
740
741 b = next;
742 } while (b != NULL);
735}
736
737
738#if (NXT_DEBUG)
739
740void nxt_event_engine_thread_adopt(nxt_event_engine_t *engine)
741{
742 nxt_work_queue_thread_adopt(&engine->fast_work_queue);
743 nxt_work_queue_thread_adopt(&engine->accept_work_queue);
744 nxt_work_queue_thread_adopt(&engine->read_work_queue);
745 nxt_work_queue_thread_adopt(&engine->socket_work_queue);
746 nxt_work_queue_thread_adopt(&engine->connect_work_queue);
747 nxt_work_queue_thread_adopt(&engine->write_work_queue);
748 nxt_work_queue_thread_adopt(&engine->shutdown_work_queue);
749 nxt_work_queue_thread_adopt(&engine->close_work_queue);
750}
751
752#endif
743}
744
745
746#if (NXT_DEBUG)
747
748void nxt_event_engine_thread_adopt(nxt_event_engine_t *engine)
749{
750 nxt_work_queue_thread_adopt(&engine->fast_work_queue);
751 nxt_work_queue_thread_adopt(&engine->accept_work_queue);
752 nxt_work_queue_thread_adopt(&engine->read_work_queue);
753 nxt_work_queue_thread_adopt(&engine->socket_work_queue);
754 nxt_work_queue_thread_adopt(&engine->connect_work_queue);
755 nxt_work_queue_thread_adopt(&engine->write_work_queue);
756 nxt_work_queue_thread_adopt(&engine->shutdown_work_queue);
757 nxt_work_queue_thread_adopt(&engine->close_work_queue);
758}
759
760#endif