mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-06 16:09:43 +00:00
map: mark removed object as removed
Normally the invalid bit is set on the removed object by copying it from the free list. If there is no free list, also set the bit.
This commit is contained in:
parent
a37694fde5
commit
954da89756
|
@ -139,7 +139,7 @@ static inline bool pw_map_insert_at(struct pw_map *map, uint32_t id, void *data)
|
|||
*/
|
||||
static inline void pw_map_remove(struct pw_map *map, uint32_t id)
|
||||
{
|
||||
pw_map_get_item(map, id)->next = map->free_list;
|
||||
pw_map_get_item(map, id)->next = map->free_list | 1;
|
||||
map->free_list = (id << 1) | 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue