nxt_port_hash.c (348:5342d18db890) nxt_port_hash.c (597:e6586cced0ab)
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_port_hash.h>
8

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

37 NXT_LVLHSH_DEFAULT,
38 nxt_port_hash_test,
39 nxt_lvlhsh_alloc,
40 nxt_lvlhsh_free,
41};
42
43
44nxt_port_t *
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_port_hash.h>
8

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

37 NXT_LVLHSH_DEFAULT,
38 nxt_port_hash_test,
39 nxt_lvlhsh_alloc,
40 nxt_lvlhsh_free,
41};
42
43
44nxt_port_t *
45nxt_port_hash_first(nxt_lvlhsh_t *port_hash, nxt_lvlhsh_each_t *lhe)
45nxt_port_hash_retrieve(nxt_lvlhsh_t *port_hash)
46{
46{
47 nxt_memzero(lhe, sizeof(nxt_lvlhsh_each_t));
48
49 lhe->proto = &lvlhsh_ports_proto;
50
51 return nxt_port_hash_next(port_hash, lhe);
47 return nxt_lvlhsh_retrieve(port_hash, &lvlhsh_ports_proto, NULL);
52}
53
54
55nxt_inline void
56nxt_port_hash_lhq(nxt_lvlhsh_query_t *lhq, nxt_pid_port_id_t *pid_port)
57{
58 lhq->key_hash = nxt_murmur_hash2(pid_port, sizeof(nxt_pid_port_id_t));
59 lhq->key.length = sizeof(nxt_pid_port_id_t);

--- 87 unchanged lines hidden ---
48}
49
50
51nxt_inline void
52nxt_port_hash_lhq(nxt_lvlhsh_query_t *lhq, nxt_pid_port_id_t *pid_port)
53{
54 lhq->key_hash = nxt_murmur_hash2(pid_port, sizeof(nxt_pid_port_id_t));
55 lhq->key.length = sizeof(nxt_pid_port_id_t);

--- 87 unchanged lines hidden ---