Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 418) sorted by relevance

12345678910>>...17

/Zephyr-Core-3.6.0/lib/hash/
Dhash_map_sc.c33 static void sys_hashmap_sc_insert_entry(struct sys_hashmap *map, struct sys_hashmap_sc_entry *entry) in sys_hashmap_sc_insert_entry() argument
35 sys_dlist_t *buckets = map->data->buckets; in sys_hashmap_sc_insert_entry()
36 uint32_t hash = map->hash_func(&entry->key, sizeof(entry->key)); in sys_hashmap_sc_insert_entry()
38 sys_dlist_append(&buckets[hash % map->data->n_buckets], &entry->node); in sys_hashmap_sc_insert_entry()
39 ++map->data->size; in sys_hashmap_sc_insert_entry()
42 static void sys_hashmap_sc_insert_all(struct sys_hashmap *map, sys_dlist_t *list) in sys_hashmap_sc_insert_all() argument
49 sys_hashmap_sc_insert_entry(map, entry); in sys_hashmap_sc_insert_all()
53 static void sys_hashmap_sc_to_list(struct sys_hashmap *map, sys_dlist_t *list) in sys_hashmap_sc_to_list() argument
57 sys_dlist_t *buckets = map->data->buckets; in sys_hashmap_sc_to_list()
61 for (size_t i = 0; i < map->data->n_buckets; ++i) { in sys_hashmap_sc_to_list()
[all …]
Dhash_map_cxx.cpp17 cxx_map *umap = static_cast<cxx_map *>(it->map->data->buckets); in sys_hashmap_cxx_iter_next()
21 __ASSERT(it->size == it->map->data->size, "Concurrent modification!"); in sys_hashmap_cxx_iter_next()
37 static void sys_hashmap_cxx_iter(const struct sys_hashmap *map, struct sys_hashmap_iterator *it) in sys_hashmap_cxx_iter() argument
39 it->map = map; in sys_hashmap_cxx_iter()
45 *((size_t *)&it->size) = map->data->size; in sys_hashmap_cxx_iter()
48 static void sys_hashmap_cxx_clear(struct sys_hashmap *map, sys_hashmap_callback_t cb, void *cookie) in sys_hashmap_cxx_clear() argument
50 cxx_map *umap = static_cast<cxx_map *>(map->data->buckets); in sys_hashmap_cxx_clear()
64 map->data->buckets = nullptr; in sys_hashmap_cxx_clear()
65 map->data->n_buckets = 0; in sys_hashmap_cxx_clear()
66 map->data->size = 0; in sys_hashmap_cxx_clear()
[all …]
Dhash_map_oa_lp.c37 static struct oalp_entry *sys_hashmap_oa_lp_find(const struct sys_hashmap *map, uint64_t key, in sys_hashmap_oa_lp_find() argument
41 const size_t n_buckets = map->data->n_buckets; in sys_hashmap_oa_lp_find()
42 uint32_t hash = map->hash_func(&key, sizeof(key)); in sys_hashmap_oa_lp_find()
43 struct oalp_entry *const buckets = map->data->buckets; in sys_hashmap_oa_lp_find()
76 static int sys_hashmap_oa_lp_insert_no_rehash(struct sys_hashmap *map, uint64_t key, uint64_t value, in sys_hashmap_oa_lp_insert_no_rehash() argument
81 struct sys_hashmap_oa_lp_data *data = (struct sys_hashmap_oa_lp_data *)map->data; in sys_hashmap_oa_lp_insert_no_rehash()
83 entry = sys_hashmap_oa_lp_find(map, key, true, true, true); in sys_hashmap_oa_lp_insert_no_rehash()
113 static int sys_hashmap_oa_lp_rehash(struct sys_hashmap *map, bool grow) in sys_hashmap_oa_lp_rehash() argument
121 struct sys_hashmap_oa_lp_data *data = (struct sys_hashmap_oa_lp_data *)map->data; in sys_hashmap_oa_lp_rehash()
123 if (!sys_hashmap_should_rehash(map, grow, data->n_tombstones, &new_n_buckets)) { in sys_hashmap_oa_lp_rehash()
[all …]
/Zephyr-Core-3.6.0/tests/lib/hash_map/src/
Dinsert.c16 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
18 zassert_equal(1, sys_hashmap_insert(&map, 1, 1, NULL)); in ZTEST()
19 zassert_equal(1, sys_hashmap_size(&map)); in ZTEST()
20 zassert_true(sys_hashmap_contains_key(&map, 1)); in ZTEST()
22 zassert_equal(1, sys_hashmap_insert(&map, 2, 2, NULL)); in ZTEST()
23 zassert_equal(2, sys_hashmap_size(&map)); in ZTEST()
24 zassert_true(sys_hashmap_contains_key(&map, 2)); in ZTEST()
31 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
33 zassert_equal(1, sys_hashmap_insert(&map, 1, 1, NULL)); in ZTEST()
34 zassert_equal(1, sys_hashmap_size(&map)); in ZTEST()
[all …]
Dremove.c17 ret = sys_hashmap_insert(&map, i, i, NULL); in ZTEST()
19 zassert_equal(i + 1, sys_hashmap_size(&map)); in ZTEST()
23 zassert_equal(true, sys_hashmap_remove(&map, i - 1, NULL)); in ZTEST()
24 zassert_equal(i - 1, sys_hashmap_size(&map)); in ZTEST()
28 zassert_equal(map.data->buckets, NULL); in ZTEST()
29 zassert_equal(map.data->n_buckets, 0); in ZTEST()
34 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
35 zassert_false(sys_hashmap_remove(&map, 42, NULL)); in ZTEST()
37 zassert_equal(1, sys_hashmap_insert(&map, 1, 1, NULL)); in ZTEST()
38 zassert_false(sys_hashmap_remove(&map, 42, NULL)); in ZTEST()
Dclear.c16 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
18 zassert_equal(1, sys_hashmap_insert(&map, i, i, NULL)); in ZTEST()
21 zassert_equal(N, sys_hashmap_size(&map)); in ZTEST()
23 sys_hashmap_clear(&map, NULL, NULL); in ZTEST()
24 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
39 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
41 zassert_equal(1, sys_hashmap_insert(&map, i, i, NULL)); in ZTEST()
44 zassert_equal(ARRAY_SIZE(cleared), sys_hashmap_size(&map)); in ZTEST()
46 sys_hashmap_clear(&map, clear_callback, cleared); in ZTEST()
47 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
Dget.c17 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
18 zassert_equal(1, sys_hashmap_insert(&map, 0, 0, NULL)); in ZTEST()
19 zassert_true(sys_hashmap_get(&map, 0, NULL)); in ZTEST()
20 zassert_true(sys_hashmap_get(&map, 0, &value)); in ZTEST()
24 ret = sys_hashmap_insert(&map, i, i, NULL); in ZTEST()
29 zassert_true(sys_hashmap_get(&map, i, NULL)); in ZTEST()
38 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
40 zassert_false(sys_hashmap_get(&map, 73, &value)); in ZTEST()
44 ret = sys_hashmap_insert(&map, i, i, NULL); in ZTEST()
48 zassert_false(sys_hashmap_get(&map, 0x4242424242424242ULL, NULL)); in ZTEST()
Dsize.c14 zassert_equal(0, sys_hashmap_size(&map)); in ZTEST()
16 zassume_equal(1, sys_hashmap_insert(&map, 1, 1, NULL)); in ZTEST()
17 zassert_equal(1, sys_hashmap_size(&map)); in ZTEST()
19 zassume_equal(1, sys_hashmap_insert(&map, 2, 2, NULL)); in ZTEST()
20 zassert_equal(2, sys_hashmap_size(&map)); in ZTEST()
Dload_factor.c17 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
18 zassert_equal(0, sys_hashmap_load_factor(&map)); in ZTEST()
21 ret = sys_hashmap_insert(&map, i, i, NULL); in ZTEST()
23 load_factor = sys_hashmap_load_factor(&map); in ZTEST()
28 zassert_equal(true, sys_hashmap_remove(&map, i - 1, NULL)); in ZTEST()
29 load_factor = sys_hashmap_load_factor(&map); in ZTEST()
Dempty.c17 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
20 zassume_equal(1, sys_hashmap_insert(&map, 1, 1, NULL)); in ZTEST()
21 zassert_false(sys_hashmap_is_empty(&map)); in ZTEST()
Dforeach.c24 zassert_true(sys_hashmap_is_empty(&map)); in ZTEST()
27 zassert_equal(1, sys_hashmap_insert(&map, i, i, NULL)); in ZTEST()
30 zassert_equal(ARRAY_SIZE(called), sys_hashmap_size(&map)); in ZTEST()
32 sys_hashmap_foreach(&map, foreach_callback, called); in ZTEST()
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/ll_sw/
Dull_chan.c41 static uint8_t map[5]; variable
75 map[0] = 0xFF; in ull_chan_reset()
76 map[1] = 0xFF; in ull_chan_reset()
77 map[2] = 0xFF; in ull_chan_reset()
78 map[3] = 0xFF; in ull_chan_reset()
79 map[4] = 0x1F; in ull_chan_reset()
85 (void)memcpy(chan_map, map, sizeof(map)); in ull_chan_map_get()
92 (void)memcpy(map, chan_map, sizeof(map)); in chan_map_set()
93 count = util_ones_count_get(map, sizeof(map)); in chan_map_set()
/Zephyr-Core-3.6.0/include/zephyr/sys/
Dhash_map.h144 static inline void sys_hashmap_foreach(const struct sys_hashmap *map, sys_hashmap_callback_t cb, in sys_hashmap_foreach() argument
149 for (map->api->iter(map, &it); sys_hashmap_iterator_has_next(&it);) { in sys_hashmap_foreach()
164 static inline void sys_hashmap_clear(struct sys_hashmap *map, sys_hashmap_callback_t cb, in sys_hashmap_clear() argument
167 map->api->clear(map, cb, cookie); in sys_hashmap_clear()
185 static inline int sys_hashmap_insert(struct sys_hashmap *map, uint64_t key, uint64_t value, in sys_hashmap_insert() argument
188 return map->api->insert(map, key, value, old_value); in sys_hashmap_insert()
203 static inline bool sys_hashmap_remove(struct sys_hashmap *map, uint64_t key, uint64_t *value) in sys_hashmap_remove() argument
205 return map->api->remove(map, key, value); in sys_hashmap_remove()
220 static inline bool sys_hashmap_get(const struct sys_hashmap *map, uint64_t key, uint64_t *value) in sys_hashmap_get() argument
222 return map->api->get(map, key, value); in sys_hashmap_get()
[all …]
Dhash_map_api.h46 const struct sys_hashmap *map; member
94 typedef void (*sys_hashmap_iterator_t)(const struct sys_hashmap *map,
117 typedef void (*sys_hashmap_clear_t)(struct sys_hashmap *map, sys_hashmap_callback_t cb,
134 typedef int (*sys_hashmap_insert_t)(struct sys_hashmap *map, uint64_t key, uint64_t value,
149 typedef bool (*sys_hashmap_remove_t)(struct sys_hashmap *map, uint64_t key, uint64_t *value);
163 typedef bool (*sys_hashmap_get_t)(const struct sys_hashmap *map, uint64_t key, uint64_t *value);
/Zephyr-Core-3.6.0/dts/arm/nuvoton/npcx/
Dnpcx-miwus-int-map.dtsi9 npcx-miwus-int-map {
10 map_miwu0_groups: map-miwu0-groups {
11 compatible = "nuvoton,npcx-miwu-int-map";
14 group_b0: group-b0-map {
19 group_c0: group-c0-map {
26 map_miwu1_groups: map-miwu1-groups {
27 compatible = "nuvoton,npcx-miwu-int-map";
30 group_a1: group-a1-map {
35 group_b1: group-b1-map {
40 group_c1: group-c1-map {
[all …]
/Zephyr-Core-3.6.0/dts/arm/nuvoton/npcx/npcx4/
Dnpcx4-miwus-int-map.dtsi8 #include <nuvoton/npcx/npcx-miwus-int-map.dtsi>
13 npcx-miwus-int-map {
14 map_miwu0_groups: map-miwu0-groups {
15 compatible = "nuvoton,npcx-miwu-int-map";
18 group_a0: group-a0-map {
23 group_d0: group-d0-map {
28 group_e0: group-e0-map {
33 group_f0: group-f0-map {
38 group_g0: group-g0-map {
43 group_h0: group-h0-map {
[all …]
/Zephyr-Core-3.6.0/dts/arm/nuvoton/npcx/npcx9/
Dnpcx9-miwus-int-map.dtsi8 #include <nuvoton/npcx/npcx-miwus-int-map.dtsi>
13 npcx-miwus-int-map {
14 map_miwu0_groups: map-miwu0-groups {
15 compatible = "nuvoton,npcx-miwu-int-map";
18 group_a0: group-a0-map {
23 group_d0: group-d0-map {
28 group_e0: group-e0-map {
33 group_f0: group-f0-map {
38 group_g0: group-g0-map {
43 group_h0: group-h0-map {
[all …]
/Zephyr-Core-3.6.0/subsys/mgmt/mcumgr/util/src/
Dzcbor_bulk.c15 int zcbor_map_decode_bulk(zcbor_state_t *zsd, struct zcbor_map_decode_key_val *map, in zcbor_map_decode_bulk() argument
19 struct zcbor_map_decode_key_val *dptr = map; in zcbor_map_decode_bulk()
36 if (dptr >= (map + map_size)) { in zcbor_map_decode_bulk()
37 dptr = map; in zcbor_map_decode_bulk()
74 bool zcbor_map_decode_bulk_key_found(struct zcbor_map_decode_key_val *map, size_t map_size, in zcbor_map_decode_bulk_key_found() argument
78 struct zcbor_map_decode_key_val *dptr = map; in zcbor_map_decode_bulk_key_found()
83 while (dptr < (map + map_size)) { in zcbor_map_decode_bulk_key_found()
92 dptr = map; in zcbor_map_decode_bulk_key_found()
94 while (dptr < (map + map_size)) { in zcbor_map_decode_bulk_key_found()
105 void zcbor_map_decode_bulk_reset(struct zcbor_map_decode_key_val *map, size_t map_size) in zcbor_map_decode_bulk_reset() argument
[all …]
/Zephyr-Core-3.6.0/dts/arm/nuvoton/npcx/npcx7/
Dnpcx7-miwus-int-map.dtsi8 #include <nuvoton/npcx/npcx-miwus-int-map.dtsi>
13 npcx-miwus-int-map {
14 map_miwu0_groups: map-miwu0-groups {
15 compatible = "nuvoton,npcx-miwu-int-map";
18 group_ad0: group-ad0-map {
23 group_efgh0: group-efgh0-map {
30 map_miwu2_groups: map-miwu2-groups {
31 compatible = "nuvoton,npcx-miwu-int-map";
34 group_fg2: group-fg2-map {
/Zephyr-Core-3.6.0/boards/arm/wio_terminal/
Dgrove_connectors.dtsi10 gpio-map-mask = <0xffffffff 0xffffffc0>;
11 gpio-map-pass-thru = <0 0x3f>;
12 gpio-map = <0 0 &portb 8 0>, /* A0/D0 */
18 gpio-map-mask = <0xffffffff 0xffffffc0>;
19 gpio-map-pass-thru = <0 0x3f>;
20 gpio-map = <0 0 &porta 16 0>, /* I2C1_SCL */
/Zephyr-Core-3.6.0/tests/modules/thrift/ThriftTest/src/
Dserver.hpp97 void testMap(map<int32_t, int32_t> &out, const map<int32_t, int32_t> &thing) override in testMap()
99 map<int32_t, int32_t>::const_iterator m_iter; in testMap()
117 void testStringMap(map<std::string, std::string> &out, in testStringMap()
118 const map<std::string, std::string> &thing) override in testStringMap()
120 map<std::string, std::string>::const_iterator m_iter; in testStringMap()
188 void testMapMap(map<int32_t, map<int32_t, int32_t>> &mapmap, const int32_t hello) override in testMapMap()
190 map<int32_t, int32_t> pos; in testMapMap()
191 map<int32_t, int32_t> neg; in testMapMap()
203 void testInsanity(map<UserId, map<Numberz::type, Insanity>> &insane, in testInsanity()
207 map<Numberz::type, Insanity> first_map; in testInsanity()
[all …]
/Zephyr-Core-3.6.0/subsys/storage/flash_map/
DKconfig1 # Flash map abstraction module
7 # Flash map
11 bool "Flash map abstraction module"
14 Enable support of flash map abstraction.
19 bool "Flash map shell interface"
26 bool "Custom flash map description"
28 This option enables custom flash map description.
41 If enabled the label property of the flash map can be retrieved
/Zephyr-Core-3.6.0/scripts/dts/python-devicetree/tests/
Dtest.dts51 interrupt-map-test {
75 interrupt-map = <
76 0 0 0 0 &{/interrupt-map-test/controller-0} 0 0
77 0 0 0 1 &{/interrupt-map-test/controller-1} 0 0 0 1
78 0 0 0 2 &{/interrupt-map-test/controller-2} 0 0 0 0 0 2
79 0 1 0 0 &{/interrupt-map-test/controller-0} 0 3
80 0 1 0 1 &{/interrupt-map-test/controller-1} 0 0 0 4
81 0 1 0 2 &{/interrupt-map-test/controller-2} 0 0 0 0 0 5>;
86 interrupt-parent = <&{/interrupt-map-test/nexus}>;
91 &{/interrupt-map-test/nexus} 0 0
[all …]
/Zephyr-Core-3.6.0/boards/shields/arduino_uno_click/
Darduino_uno_click.overlay11 gpio-map-mask = <0xffffffff 0xffffffc0>;
12 gpio-map-pass-thru = <0 0x3f>;
13 gpio-map = <0 0 &arduino_header 0 0>, /* AN -> A0 */
34 gpio-map-mask = <0xffffffff 0xffffffc0>;
35 gpio-map-pass-thru = <0 0x3f>;
36 gpio-map = <0 0 &arduino_header 1 0>, /* AN -> A1 */
/Zephyr-Core-3.6.0/boards/xtensa/m5stack_atoms3/
Dgrove_connectors.dtsi10 gpio-map-mask = <0xffffffff 0xffffffc0>;
11 gpio-map-pass-thru = <0 0x3f>;
12 gpio-map = <0 0 &gpio0 1 0>,

12345678910>>...17