Blender V5.3
BLI_linklist_lockfree.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2018 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11namespace blender {
12
15 /* NOTE: "Subclass" this structure to add custom-defined data. */
16};
17
19 /* We keep a dummy node at the beginning of the list all the time.
20 * This allows us to make sure head and tail pointers are always
21 * valid, and saves from annoying exception cases in insert().
22 */
24 /* NOTE: This fields might point to a dummy node. */
26};
27
28typedef void (*LockfreeeLinkNodeFreeFP)(void *link);
29
30/* ************************************************************************** */
31/* NOTE: These functions are NOT safe for use from threads. */
32/* NOTE: !!! I REPEAT: DO NOT USE THEM WITHOUT EXTERNAL LOCK !!! */
33
36
39
44
50
51/* ************************************************************************** */
52/* NOTE: These functions are safe for use from threads. */
53
55
56} // namespace blender
BMesh Iterators.
void BLI_linklist_lockfree_init(LockfreeLinkList *list)
void BLI_linklist_lockfree_free(LockfreeLinkList *list, LockfreeeLinkNodeFreeFP free_func)
void(*) LockfreeeLinkNodeFreeFP(void *link)
void BLI_linklist_lockfree_insert(LockfreeLinkList *list, LockfreeLinkNode *node)
LockfreeLinkNode * BLI_linklist_lockfree_begin(LockfreeLinkList *list)
void BLI_linklist_lockfree_clear(LockfreeLinkList *list, LockfreeeLinkNodeFreeFP free_func)
struct LockfreeLinkNode * next