/unit/src/ |
H A D | nxt_port_hash.c | 56 lhq->key.start = (u_char *) pid_port; in nxt_port_hash_lhq() 57 lhq->proto = &lvlhsh_ports_proto; in nxt_port_hash_lhq() 58 lhq->pool = NULL; in nxt_port_hash_lhq() 67 nxt_lvlhsh_query_t lhq; in nxt_port_hash_add() local 72 nxt_port_hash_lhq(&lhq, &pid_port); in nxt_port_hash_add() 73 lhq.replace = 0; in nxt_port_hash_add() 74 lhq.value = port; in nxt_port_hash_add() 98 nxt_lvlhsh_query_t lhq; in nxt_port_hash_remove() local 103 nxt_port_hash_lhq(&lhq, &pid_port); in nxt_port_hash_remove() 127 nxt_lvlhsh_query_t lhq; in nxt_port_hash_find() local [all …]
|
H A D | nxt_fd_event.c | 36 nxt_lvlhsh_query_t lhq; in nxt_fd_event_hash_add() local 39 lhq.replace = 0; in nxt_fd_event_hash_add() 40 lhq.value = ev; in nxt_fd_event_hash_add() 41 lhq.proto = &nxt_event_set_fd_hash_proto; in nxt_fd_event_hash_add() 43 ret = nxt_lvlhsh_insert(lvlhsh, &lhq); in nxt_fd_event_hash_add() 59 nxt_lvlhsh_query_t lhq; in nxt_fd_event_hash_get() local 62 lhq.proto = &nxt_event_set_fd_hash_proto; in nxt_fd_event_hash_get() 64 ret = nxt_lvlhsh_find(lvlhsh, &lhq); in nxt_fd_event_hash_get() 67 return lhq.value; in nxt_fd_event_hash_get() 81 nxt_lvlhsh_query_t lhq; in nxt_fd_event_hash_delete() local [all …]
|
H A D | nxt_upstream_source.c | 10 static nxt_int_t nxt_upstream_header_hash_test(nxt_lvlhsh_query_t *lhq, 27 nxt_lvlhsh_query_t lhq; in nxt_upstream_header_hash_add() local 30 lhq.key_hash = nxt_djb_hash(unv->name, unv->len); in nxt_upstream_header_hash_add() 31 lhq.replace = 1; in nxt_upstream_header_hash_add() 32 lhq.key.len = unv->len; in nxt_upstream_header_hash_add() 33 lhq.key.data = (u_char *) unv->name; in nxt_upstream_header_hash_add() 34 lhq.value = (void *) unv; in nxt_upstream_header_hash_add() 35 lhq.proto = &nxt_upstream_header_hash_proto; in nxt_upstream_header_hash_add() 36 lhq.pool = mp; in nxt_upstream_header_hash_add() 38 if (nxt_lvlhsh_insert(lh, &lhq) != NXT_OK) { in nxt_upstream_header_hash_add() [all …]
|
H A D | nxt_hash.h | 19 nxt_hash_find(nxt_hash_t *h, nxt_lvlhsh_query_t *lhq) in nxt_hash_find() argument 21 lhq->proto = h->proto; in nxt_hash_find() 23 return nxt_lvlhsh_find(&h->lvlhsh, lhq); in nxt_hash_find() 28 nxt_hash_insert(nxt_hash_t *h, nxt_lvlhsh_query_t *lhq) in nxt_hash_insert() argument 30 lhq->proto = h->proto; in nxt_hash_insert() 31 lhq->pool = h->pool; in nxt_hash_insert() 33 return nxt_lvlhsh_insert(&h->lvlhsh, lhq); in nxt_hash_insert() 38 nxt_hash_delete(nxt_hash_t *h, nxt_lvlhsh_query_t *lhq) in nxt_hash_delete() argument 40 lhq->proto = h->proto; in nxt_hash_delete() 41 lhq->pool = h->pool; in nxt_hash_delete() [all …]
|
H A D | nxt_lvlhsh.c | 193 return nxt_lvlhsh_level_find(lhq, slot, lhq->key_hash, 0); in nxt_lvlhsh_find() 247 if (lhq->proto->test(lhq, value) == NXT_OK) { in nxt_lvlhsh_bucket_find() 292 bucket = lhq->proto->alloc(lhq->pool, nxt_lvlhsh_bucket_size(lhq->proto)); in nxt_lvlhsh_new_bucket() 359 proto = lhq->proto; in nxt_lvlhsh_bucket_insert() 462 proto = lhq->proto; in nxt_lvlhsh_convert_bucket_to_level() 491 q.pool = lhq->pool; in nxt_lvlhsh_convert_bucket_to_level() 560 proto = lhq->proto; in nxt_lvlhsh_bucket_convertion_insert() 607 proto = lhq->proto; in nxt_lvlhsh_free_level() 636 return nxt_lvlhsh_level_delete(lhq, &lh->slot, lhq->key_hash, 0); in nxt_lvlhsh_delete() 673 lhq->proto->free(lhq->pool, lvl); in nxt_lvlhsh_level_delete() [all …]
|
H A D | nxt_port_rpc.c | 127 nxt_lvlhsh_query_t lhq; in nxt_port_rpc_register_handler_ex() local 148 lhq.replace = 0; in nxt_port_rpc_register_handler_ex() 149 lhq.value = reg; in nxt_port_rpc_register_handler_ex() 194 nxt_lvlhsh_query_t lhq; in nxt_port_rpc_ex_set_peer() local 217 lhq.replace = 0; in nxt_port_rpc_ex_set_peer() 218 lhq.value = ®->link; in nxt_port_rpc_ex_set_peer() 259 nxt_lvlhsh_query_t lhq; in nxt_port_rpc_remove_from_peers() local 280 lhq.replace = 1; in nxt_port_rpc_remove_from_peers() 341 reg = lhq.value; in nxt_port_rpc_handler() 400 peer_link = lhq.value; in nxt_port_rpc_remove_peer() [all …]
|
H A D | nxt_var.c | 123 nxt_lvlhsh_query_t lhq; in nxt_var_hash_find() local 126 lhq.key = *name; in nxt_var_hash_find() 133 return lhq.value; in nxt_var_hash_find() 147 nxt_lvlhsh_query_t lhq; in nxt_var_cache_find() local 158 return lhq.value; in nxt_var_cache_find() 166 nxt_lvlhsh_query_t lhq; in nxt_var_cache_add() local 169 lhq.replace = 0; in nxt_var_cache_add() 172 lhq.value = value; in nxt_var_cache_add() 174 lhq.pool = mp; in nxt_var_cache_add() 186 lhq.replace = 0; in nxt_var_register() [all …]
|
H A D | nxt_cache.c | 133 nxt_lvlhsh_query_t lhq; in nxt_cache_query() local 140 lhq.replace = 0; in nxt_cache_query() 164 nxt_lvlhsh_query_t *lhq) in nxt_cache_query_locked() argument 184 node = lhq->value; in nxt_cache_query_locked() 202 nxt_lvlhsh_query_t *lhq) in nxt_cache_node_hold() argument 220 lhq->value = sentinel; in nxt_cache_node_hold() 244 node = lhq->value; in nxt_cache_node_hold() 424 lhq.replace = 1; in nxt_cache_update() 427 lhq.value = node; in nxt_cache_update() 429 lhq.pool = cache->pool; in nxt_cache_update() [all …]
|
H A D | nxt_http_parse.h | 138 nxt_lvlhsh_query_t lhq; in nxt_http_field_process() local 141 lhq.proto = &nxt_http_fields_hash_proto; in nxt_http_field_process() 143 lhq.key_hash = field->hash; in nxt_http_field_process() 144 lhq.key.length = field->name_length; in nxt_http_field_process() 145 lhq.key.start = field->name; in nxt_http_field_process() 147 if (nxt_lvlhsh_find(hash, &lhq) != NXT_OK) { in nxt_http_field_process() 151 proc = lhq.value; in nxt_http_field_process()
|
H A D | nxt_poll_engine.c | 391 nxt_lvlhsh_query_t lhq; in nxt_poll_set_add() local 423 lhq.replace = 0; in nxt_poll_set_add() 424 lhq.value = phe; in nxt_poll_set_add() 426 lhq.data = engine; in nxt_poll_set_add() 464 nxt_lvlhsh_query_t lhq; in nxt_poll_set_delete() local 471 lhq.data = engine; in nxt_poll_set_delete() 479 phe = lhq.value; in nxt_poll_set_delete() 493 nxt_free(lhq.value); in nxt_poll_set_delete() 644 lhq.data = engine; in nxt_poll_fd_hash_get() 647 phe = lhq.value; in nxt_poll_fd_hash_get() [all …]
|
H A D | nxt_lvlhsh.h | 13 typedef nxt_int_t (*nxt_lvlhsh_test_t)(nxt_lvlhsh_query_t *lhq, void *data); 131 NXT_EXPORT nxt_int_t nxt_lvlhsh_find(nxt_lvlhsh_t *lh, nxt_lvlhsh_query_t *lhq); 148 nxt_lvlhsh_query_t *lhq); 159 nxt_lvlhsh_query_t *lhq);
|
H A D | nxt_runtime.c | 1463 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_find() local 1472 process = lhq.value; in nxt_runtime_process_find() 1488 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_get() local 1499 process = lhq.value; in nxt_runtime_process_get() 1515 lhq.replace = 0; in nxt_runtime_process_get() 1516 lhq.value = process; in nxt_runtime_process_get() 1517 lhq.pool = rt->mem_pool; in nxt_runtime_process_get() 1549 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_add() local 1557 lhq.replace = 0; in nxt_runtime_process_add() 1558 lhq.value = process; in nxt_runtime_process_add() [all …]
|
H A D | nxt_http_static.c | 1012 nxt_lvlhsh_query_t lhq; in nxt_http_static_mtypes_hash_add() local 1023 lhq.key = *exten; in nxt_http_static_mtypes_hash_add() 1024 lhq.key_hash = nxt_djb_hash_lowcase(lhq.key.start, lhq.key.length); in nxt_http_static_mtypes_hash_add() 1025 lhq.replace = 1; in nxt_http_static_mtypes_hash_add() 1026 lhq.value = mtype; in nxt_http_static_mtypes_hash_add() 1028 lhq.pool = mp; in nxt_http_static_mtypes_hash_add() 1030 return nxt_lvlhsh_insert(hash, &lhq); in nxt_http_static_mtypes_hash_add() 1037 nxt_lvlhsh_query_t lhq; in nxt_http_static_mtype_get() local 1042 lhq.key = *exten; in nxt_http_static_mtype_get() 1043 lhq.key_hash = nxt_djb_hash_lowcase(lhq.key.start, lhq.key.length); in nxt_http_static_mtype_get() [all …]
|
H A D | nxt_cert.c | 372 nxt_lvlhsh_query_t lhq; in nxt_cert_info_save() local 398 lhq.replace = 1; in nxt_cert_info_save() 399 lhq.key = *name; in nxt_cert_info_save() 400 lhq.value = info; in nxt_cert_info_save() 408 if (lhq.value != info) { in nxt_cert_info_save() 409 info = lhq.value; in nxt_cert_info_save() 427 nxt_lvlhsh_query_t lhq; in nxt_cert_info_get() local 430 lhq.key = *name; in nxt_cert_info_get() 438 info = lhq.value; in nxt_cert_info_get() 798 lhq.key = *name; in nxt_cert_info_delete() [all …]
|
H A D | nxt_http_parse.c | 1164 if (nxt_strcasestr_eq(&lhq->key, &field->name)) { in nxt_http_field_hash_test() 1188 nxt_lvlhsh_query_t lhq; in nxt_http_fields_hash() local 1190 lhq.replace = 0; in nxt_http_fields_hash() 1191 lhq.proto = &nxt_http_fields_hash_proto; in nxt_http_fields_hash() 1203 lhq.key = *name; in nxt_http_fields_hash() 1204 lhq.value = &items[i]; in nxt_http_fields_hash() 1206 ret = nxt_lvlhsh_insert(hash, &lhq); in nxt_http_fields_hash() 1226 nxt_lvlhsh_query_t lhq; in nxt_http_fields_hash_collisions() local 1231 lhq.replace = 0; in nxt_http_fields_hash_collisions() 1232 lhq.proto = &proto; in nxt_http_fields_hash_collisions() [all …]
|
H A D | nxt_application.c | 1074 qpid = (nxt_pid_t *) lhq->key.start; in nxt_proto_lvlhsh_isolated_pid_test() 1097 lhq->key.start = (u_char *) pid; in nxt_proto_process_lhq_pid() 1106 nxt_lvlhsh_query_t lhq; in nxt_proto_process_add() local 1112 lhq.replace = 0; in nxt_proto_process_add() 1113 lhq.value = process; in nxt_proto_process_add() 1114 lhq.pool = rt->mem_pool; in nxt_proto_process_add() 1137 nxt_lvlhsh_query_t lhq; in nxt_proto_process_remove() local 1143 lhq.pool = rt->mem_pool; in nxt_proto_process_remove() 1150 process = lhq.value; in nxt_proto_process_remove() 1171 nxt_lvlhsh_query_t lhq; in nxt_proto_process_find() local [all …]
|
H A D | nxt_port_socket.c | 1080 nxt_lvlhsh_query_t lhq; in nxt_port_frag_start() local 1099 lhq.key.start = (u_char *) &frag_key; in nxt_port_frag_start() 1100 lhq.proto = &lvlhsh_frag_proto; in nxt_port_frag_start() 1101 lhq.replace = 0; in nxt_port_frag_start() 1102 lhq.value = fmsg; in nxt_port_frag_start() 1103 lhq.pool = port->mem_pool; in nxt_port_frag_start() 1136 nxt_lvlhsh_query_t lhq; in nxt_port_frag_find() local 1149 lhq.key.start = (u_char *) &frag_key; in nxt_port_frag_find() 1150 lhq.proto = &lvlhsh_frag_proto; in nxt_port_frag_find() 1151 lhq.pool = port->mem_pool; in nxt_port_frag_find() [all …]
|
H A D | nxt_openssl.c | 981 nxt_lvlhsh_query_t lhq; local 998 lhq.pool = mp; 999 lhq.key = item->name; 1000 lhq.value = item; 1001 lhq.proto = &nxt_openssl_bundle_hash_proto; 1002 lhq.replace = 0; 1005 ret = nxt_lvlhsh_insert(lvlhsh, &lhq); 1013 old = lhq.value; 1117 nxt_lvlhsh_query_t lhq; local 1121 lhq.key = *sn; [all …]
|
H A D | nxt_http_source.c | 325 nxt_lvlhsh_query_t lhq; in nxt_http_source_header_line_process() local 355 lhq.key_hash = nv->hash; in nxt_http_source_header_line_process() 356 lhq.key.len = nv->name_len; in nxt_http_source_header_line_process() 357 lhq.key.data = nv->name_start; in nxt_http_source_header_line_process() 358 lhq.proto = &nxt_upstream_header_hash_proto; in nxt_http_source_header_line_process() 360 if (nxt_lvlhsh_find(&hs->header_in.hash, &lhq) == NXT_OK) { in nxt_http_source_header_line_process() 361 unv = lhq.value; in nxt_http_source_header_line_process()
|
H A D | nxt_fastcgi_source.c | 547 nxt_lvlhsh_query_t lhq; in nxt_fastcgi_source_header_process() local 577 lhq.key_hash = nv->hash; in nxt_fastcgi_source_header_process() 578 lhq.key.len = nv->name_len; in nxt_fastcgi_source_header_process() 579 lhq.key.data = nv->name_start; in nxt_fastcgi_source_header_process() 580 lhq.proto = &nxt_upstream_header_hash_proto; in nxt_fastcgi_source_header_process() 582 if (nxt_lvlhsh_find(&fs->header_in.hash, &lhq) == NXT_OK) { in nxt_fastcgi_source_header_process() 583 unv = lhq.value; in nxt_fastcgi_source_header_process()
|
H A D | nxt_unit.c | 4471 lhq.replace = 0; in nxt_unit_process_get() 4472 lhq.value = process; in nxt_unit_process_get() 4511 return lhq.value; in nxt_unit_process_find() 6408 lhq->pool = NULL; in nxt_unit_port_hash_lhq() 6420 lhq.replace = 0; in nxt_unit_port_hash_add() 6421 lhq.value = port; in nxt_unit_port_hash_add() 6460 return lhq.value; in nxt_unit_port_hash_find() 6504 lhq.pool = NULL; in nxt_unit_request_hash_add() 6505 lhq.replace = 0; in nxt_unit_request_hash_add() 6506 lhq.value = req_impl; in nxt_unit_request_hash_add() [all …]
|
H A D | nxt_conf.c | 112 static nxt_int_t nxt_conf_object_hash_test(nxt_lvlhsh_query_t *lhq, 1653 nxt_lvlhsh_query_t lhq; in nxt_conf_object_hash_add() local 1655 nxt_conf_get_string(&member->name, &lhq.key); in nxt_conf_object_hash_add() 1657 lhq.key_hash = nxt_djb_hash(lhq.key.start, lhq.key.length); in nxt_conf_object_hash_add() 1658 lhq.replace = 0; in nxt_conf_object_hash_add() 1659 lhq.value = member; in nxt_conf_object_hash_add() 1660 lhq.proto = &nxt_conf_object_hash_proto; in nxt_conf_object_hash_add() 1661 lhq.pool = mp; in nxt_conf_object_hash_add() 1663 return nxt_lvlhsh_insert(lvlhsh, &lhq); in nxt_conf_object_hash_add() 1668 nxt_conf_object_hash_test(nxt_lvlhsh_query_t *lhq, void *data) in nxt_conf_object_hash_test() argument [all …]
|
H A D | nxt_router.c | 2320 nxt_lvlhsh_query_t lhq; in nxt_router_apps_hash_add() local 2323 lhq.replace = 0; in nxt_router_apps_hash_add() 2324 lhq.key = app->name; in nxt_router_apps_hash_add() 2325 lhq.value = app; in nxt_router_apps_hash_add() 2326 lhq.proto = &nxt_router_apps_hash_proto; in nxt_router_apps_hash_add() 2327 lhq.pool = rtcf->mem_pool; in nxt_router_apps_hash_add() 2329 switch (nxt_lvlhsh_insert(&rtcf->apps_hash, &lhq)) { in nxt_router_apps_hash_add() 2347 nxt_lvlhsh_query_t lhq; in nxt_router_apps_hash_get() local 2350 lhq.key = *name; in nxt_router_apps_hash_get() 2351 lhq.proto = &nxt_router_apps_hash_proto; in nxt_router_apps_hash_get() [all …]
|
/unit/src/test/ |
H A D | nxt_lvlhsh_test.c | 42 nxt_lvlhsh_query_t lhq; in nxt_lvlhsh_test_add() local 44 lhq.key_hash = key; in nxt_lvlhsh_test_add() 45 lhq.replace = 0; in nxt_lvlhsh_test_add() 48 lhq.value = (void *) key; in nxt_lvlhsh_test_add() 49 lhq.proto = proto; in nxt_lvlhsh_test_add() 50 lhq.pool = pool; in nxt_lvlhsh_test_add() 73 lhq.key_hash = key; in nxt_lvlhsh_test_get() 76 lhq.proto = proto; in nxt_lvlhsh_test_get() 99 lhq.key_hash = key; in nxt_lvlhsh_test_delete() 102 lhq.proto = proto; in nxt_lvlhsh_test_delete() [all …]
|