Home
last modified time | relevance | path

Searched refs:lhq (Results 1 – 24 of 24) sorted by relevance

/unit/src/
H A Dnxt_port_hash.c56 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 Dnxt_fd_event.c36 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 Dnxt_upstream_source.c10 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 Dnxt_hash.h19 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 Dnxt_lvlhsh.c193 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 Dnxt_port_rpc.c127 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 = &reg->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 Dnxt_cache.c133 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 Dnxt_var.c103 nxt_lvlhsh_query_t lhq; in nxt_var_hash_find() local
106 lhq.key = *name; in nxt_var_hash_find()
113 return lhq.value; in nxt_var_hash_find()
240 nxt_lvlhsh_query_t lhq; in nxt_var_cache_value() local
254 lhq.replace = 0; in nxt_var_cache_value()
257 lhq.value = value; in nxt_var_cache_value()
259 lhq.pool = query->pool; in nxt_var_cache_value()
276 return lhq.value; in nxt_var_cache_value()
284 nxt_lvlhsh_query_t lhq; in nxt_var_register() local
286 lhq.replace = 0; in nxt_var_register()
[all …]
H A Dnxt_http_parse.h138 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 Dnxt_poll_engine.c391 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 Dnxt_lvlhsh.h13 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 Dnxt_runtime.c1466 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_find() local
1475 process = lhq.value; in nxt_runtime_process_find()
1491 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_get() local
1502 process = lhq.value; in nxt_runtime_process_get()
1518 lhq.replace = 0; in nxt_runtime_process_get()
1519 lhq.value = process; in nxt_runtime_process_get()
1520 lhq.pool = rt->mem_pool; in nxt_runtime_process_get()
1552 nxt_lvlhsh_query_t lhq; in nxt_runtime_process_add() local
1560 lhq.replace = 0; in nxt_runtime_process_add()
1561 lhq.value = process; in nxt_runtime_process_add()
[all …]
H A Dnxt_cert.c372 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 Dnxt_http_parse.c1164 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 Dnxt_http_static.c1032 nxt_lvlhsh_query_t lhq; in nxt_http_static_mtypes_hash_add() local
1043 lhq.key = *exten; in nxt_http_static_mtypes_hash_add()
1044 lhq.key_hash = nxt_djb_hash_lowcase(lhq.key.start, lhq.key.length); in nxt_http_static_mtypes_hash_add()
1045 lhq.replace = 1; in nxt_http_static_mtypes_hash_add()
1046 lhq.value = mtype; in nxt_http_static_mtypes_hash_add()
1048 lhq.pool = mp; in nxt_http_static_mtypes_hash_add()
1050 return nxt_lvlhsh_insert(hash, &lhq); in nxt_http_static_mtypes_hash_add()
1057 nxt_lvlhsh_query_t lhq; in nxt_http_static_mtype_get() local
1062 lhq.key = *exten; in nxt_http_static_mtype_get()
1063 lhq.key_hash = nxt_djb_hash_lowcase(lhq.key.start, lhq.key.length); in nxt_http_static_mtype_get()
[all …]
H A Dnxt_application.c1117 qpid = (nxt_pid_t *) lhq->key.start; in nxt_proto_lvlhsh_isolated_pid_test()
1140 lhq->key.start = (u_char *) pid; in nxt_proto_process_lhq_pid()
1149 nxt_lvlhsh_query_t lhq; in nxt_proto_process_add() local
1155 lhq.replace = 0; in nxt_proto_process_add()
1156 lhq.value = process; in nxt_proto_process_add()
1157 lhq.pool = rt->mem_pool; in nxt_proto_process_add()
1180 nxt_lvlhsh_query_t lhq; in nxt_proto_process_remove() local
1186 lhq.pool = rt->mem_pool; in nxt_proto_process_remove()
1193 process = lhq.value; in nxt_proto_process_remove()
1214 nxt_lvlhsh_query_t lhq; in nxt_proto_process_find() local
[all …]
H A Dnxt_port_socket.c1080 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 Dnxt_openssl.c981 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 Dnxt_http_source.c325 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 Dnxt_fastcgi_source.c547 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 Dnxt_unit.c4460 lhq.replace = 0; in nxt_unit_process_get()
4461 lhq.value = process; in nxt_unit_process_get()
4500 return lhq.value; in nxt_unit_process_find()
6396 lhq->pool = NULL; in nxt_unit_port_hash_lhq()
6408 lhq.replace = 0; in nxt_unit_port_hash_add()
6409 lhq.value = port; in nxt_unit_port_hash_add()
6448 return lhq.value; in nxt_unit_port_hash_find()
6492 lhq.pool = NULL; in nxt_unit_request_hash_add()
6493 lhq.replace = 0; in nxt_unit_request_hash_add()
6494 lhq.value = req_impl; in nxt_unit_request_hash_add()
[all …]
H A Dnxt_conf.c112 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 Dnxt_router.c2394 nxt_lvlhsh_query_t lhq; in nxt_router_apps_hash_add() local
2397 lhq.replace = 0; in nxt_router_apps_hash_add()
2398 lhq.key = app->name; in nxt_router_apps_hash_add()
2399 lhq.value = app; in nxt_router_apps_hash_add()
2400 lhq.proto = &nxt_router_apps_hash_proto; in nxt_router_apps_hash_add()
2401 lhq.pool = rtcf->mem_pool; in nxt_router_apps_hash_add()
2403 switch (nxt_lvlhsh_insert(&rtcf->apps_hash, &lhq)) { in nxt_router_apps_hash_add()
2421 nxt_lvlhsh_query_t lhq; in nxt_router_apps_hash_get() local
2424 lhq.key = *name; in nxt_router_apps_hash_get()
2425 lhq.proto = &nxt_router_apps_hash_proto; in nxt_router_apps_hash_get()
[all …]
/unit/src/test/
H A Dnxt_lvlhsh_test.c42 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 …]