diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-02-26 17:10:40 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 19:15:30 +0100 |
commit | cdfa304b1da0eb9fb270fe78ee6acfc0dad864fc (patch) | |
tree | d9ed75f96808efec284d88d376f0bdaed4be82ca /erts/emulator/beam/erl_map.h | |
parent | 9f3f98bb7e75a00cc9eb4fc32b7839fa6fbedd3d (diff) | |
download | otp-cdfa304b1da0eb9fb270fe78ee6acfc0dad864fc.tar.gz otp-cdfa304b1da0eb9fb270fe78ee6acfc0dad864fc.tar.bz2 otp-cdfa304b1da0eb9fb270fe78ee6acfc0dad864fc.zip |
erts: Split hashmap_insert to down and up
Diffstat (limited to 'erts/emulator/beam/erl_map.h')
-rw-r--r-- | erts/emulator/beam/erl_map.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h index 7175e653d9..2d5c5c958c 100644 --- a/erts/emulator/beam/erl_map.h +++ b/erts/emulator/beam/erl_map.h @@ -85,16 +85,25 @@ typedef struct map_s { #define MAP_HEADER_SIZE (sizeof(map_t) / sizeof(Eterm)) struct ErtsWStack_; -Eterm erts_maps_put(Process *p, Eterm key, Eterm value, Eterm map); -int erts_maps_update(Process *p, Eterm key, Eterm value, Eterm map, Eterm *res); -int erts_maps_remove(Process *p, Eterm key, Eterm map, Eterm *res); -int erts_validate_and_sort_map(map_t* map); -void hashmap_iterator_init(struct ErtsWStack_* s, Eterm node); +struct ErtsEStack_; + +Eterm erts_maps_put(Process *p, Eterm key, Eterm value, Eterm map); +int erts_maps_update(Process *p, Eterm key, Eterm value, Eterm map, Eterm *res); +int erts_maps_remove(Process *p, Eterm key, Eterm map, Eterm *res); + +Eterm erts_hashmap_insert(Process *p, Uint32 hx, Eterm key, Eterm value, + Eterm node, int is_update); +int erts_hashmap_insert_down(Uint32 hx, Eterm key, Eterm node, Uint *sz, + Uint *upsz, struct ErtsEStack_ *sp, int is_update); +Eterm erts_hashmap_insert_up(Eterm *hp, Eterm key, Eterm value, + Uint *upsz, struct ErtsEStack_ *sp); + +int erts_validate_and_sort_map(map_t* map); +void hashmap_iterator_init(struct ErtsWStack_* s, Eterm node); Eterm* hashmap_iterator_next(struct ErtsWStack_* s); -int hashmap_key_hash_cmp(Eterm* ap, Eterm* bp); -Eterm erts_hashmap_from_array(Process *p, Eterm *leafs, Uint n); -Eterm erts_hashmap_insert(Process *p, Uint32 hx, Eterm key, Eterm val, Eterm node, int is_update); -const Eterm *erts_hashmap_get(Uint32 hx, Eterm key, Eterm map); +int hashmap_key_hash_cmp(Eterm* ap, Eterm* bp); +Eterm erts_hashmap_from_array(Process *p, Eterm *leafs, Uint n); +const Eterm *erts_hashmap_get(Uint32 hx, Eterm key, Eterm map); #if HALFWORD_HEAP const Eterm * |