/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_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 | 97 nxt_lvlhsh_query_t lhq; in nxt_var_hash_find() local 100 lhq.key = *name; in nxt_var_hash_find() 107 return lhq.value; in nxt_var_hash_find() 211 nxt_lvlhsh_query_t lhq; in nxt_var_cache_value() local 232 lhq.replace = 0; in nxt_var_cache_value() 235 lhq.value = value; in nxt_var_cache_value() 237 lhq.pool = cache->pool; in nxt_var_cache_value() 245 return lhq.value; in nxt_var_cache_value() 265 nxt_lvlhsh_query_t lhq; in nxt_var_register() local 267 lhq.replace = 0; in nxt_var_register() [all …]
|
H A D | nxt_http_parse.h | 140 nxt_lvlhsh_query_t lhq; in nxt_http_field_process() local 143 lhq.proto = &nxt_http_fields_hash_proto; in nxt_http_field_process() 145 lhq.key_hash = field->hash; in nxt_http_field_process() 146 lhq.key.length = field->name_length; in nxt_http_field_process() 147 lhq.key.start = field->name; in nxt_http_field_process() 149 if (nxt_lvlhsh_find(hash, &lhq) != NXT_OK) { in nxt_http_field_process() 153 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_script.c | 194 nxt_lvlhsh_query_t lhq; in nxt_script_info_save() local 220 lhq.replace = 1; in nxt_script_info_save() 221 lhq.key = *name; in nxt_script_info_save() 222 lhq.value = info; in nxt_script_info_save() 230 if (lhq.value != info) { in nxt_script_info_save() 231 info = lhq.value; in nxt_script_info_save() 249 nxt_lvlhsh_query_t lhq; in nxt_script_info_get() local 252 lhq.key = *name; in nxt_script_info_get() 260 info = lhq.value; in nxt_script_info_get() 329 lhq.key = *name; in nxt_script_info_delete() [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 | 1532 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_find() local 1541 process = lhq.value; in nxt_runtime_process_find() 1557 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_get() local 1568 process = lhq.value; in nxt_runtime_process_get() 1584 lhq.replace = 0; in nxt_runtime_process_get() 1585 lhq.value = process; in nxt_runtime_process_get() 1586 lhq.pool = rt->mem_pool; in nxt_runtime_process_get() 1618 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_add() local 1626 lhq.replace = 0; in nxt_runtime_process_add() 1627 lhq.value = process; in nxt_runtime_process_add() [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_http_static.c | 1044 nxt_lvlhsh_query_t lhq; in nxt_http_static_mtypes_hash_add() local 1055 lhq.key = *exten; in nxt_http_static_mtypes_hash_add() 1056 lhq.key_hash = nxt_djb_hash_lowcase(lhq.key.start, lhq.key.length); in nxt_http_static_mtypes_hash_add() 1057 lhq.replace = 1; in nxt_http_static_mtypes_hash_add() 1058 lhq.value = mtype; in nxt_http_static_mtypes_hash_add() 1060 lhq.pool = mp; in nxt_http_static_mtypes_hash_add() 1062 return nxt_lvlhsh_insert(hash, &lhq); in nxt_http_static_mtypes_hash_add() 1069 nxt_lvlhsh_query_t lhq; in nxt_http_static_mtype_get() local 1074 lhq.key = *exten; in nxt_http_static_mtype_get() 1075 lhq.key_hash = nxt_djb_hash_lowcase(lhq.key.start, lhq.key.length); in nxt_http_static_mtype_get() [all …]
|
H A D | nxt_application.c | 1173 qpid = (nxt_pid_t *) lhq->key.start; in nxt_proto_lvlhsh_isolated_pid_test() 1196 lhq->key.start = (u_char *) pid; in nxt_proto_process_lhq_pid() 1205 nxt_lvlhsh_query_t lhq; in nxt_proto_process_add() local 1211 lhq.replace = 0; in nxt_proto_process_add() 1212 lhq.value = process; in nxt_proto_process_add() 1213 lhq.pool = rt->mem_pool; in nxt_proto_process_add() 1236 nxt_lvlhsh_query_t lhq; in nxt_proto_process_remove() local 1242 lhq.pool = rt->mem_pool; in nxt_proto_process_remove() 1249 process = lhq.value; in nxt_proto_process_remove() 1270 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_unit.c | 4479 lhq.replace = 0; in nxt_unit_process_get() 4480 lhq.value = process; in nxt_unit_process_get() 4519 return lhq.value; in nxt_unit_process_find() 6415 lhq->pool = NULL; in nxt_unit_port_hash_lhq() 6427 lhq.replace = 0; in nxt_unit_port_hash_add() 6428 lhq.value = port; in nxt_unit_port_hash_add() 6467 return lhq.value; in nxt_unit_port_hash_find() 6511 lhq.pool = NULL; in nxt_unit_request_hash_add() 6512 lhq.replace = 0; in nxt_unit_request_hash_add() 6513 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, 1667 nxt_lvlhsh_query_t lhq; in nxt_conf_object_hash_add() local 1669 nxt_conf_get_string(&member->name, &lhq.key); in nxt_conf_object_hash_add() 1671 lhq.key_hash = nxt_djb_hash(lhq.key.start, lhq.key.length); in nxt_conf_object_hash_add() 1672 lhq.replace = 0; in nxt_conf_object_hash_add() 1673 lhq.value = member; in nxt_conf_object_hash_add() 1674 lhq.proto = &nxt_conf_object_hash_proto; in nxt_conf_object_hash_add() 1675 lhq.pool = mp; in nxt_conf_object_hash_add() 1677 return nxt_lvlhsh_insert(lvlhsh, &lhq); in nxt_conf_object_hash_add() 1682 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 | 2570 nxt_lvlhsh_query_t lhq; in nxt_router_apps_hash_add() local 2573 lhq.replace = 0; in nxt_router_apps_hash_add() 2574 lhq.key = app->name; in nxt_router_apps_hash_add() 2575 lhq.value = app; in nxt_router_apps_hash_add() 2576 lhq.proto = &nxt_router_apps_hash_proto; in nxt_router_apps_hash_add() 2577 lhq.pool = rtcf->mem_pool; in nxt_router_apps_hash_add() 2579 switch (nxt_lvlhsh_insert(&rtcf->apps_hash, &lhq)) { in nxt_router_apps_hash_add() 2597 nxt_lvlhsh_query_t lhq; in nxt_router_apps_hash_get() local 2600 lhq.key = *name; in nxt_router_apps_hash_get() 2601 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 …]
|