Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] "Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are n

[DiscordArchive] "Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are n

[DiscordArchive] "Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are n

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
04-02-2024, 11:36 AM
#1
Archived author: jackpoz • Posted: 2024-04-02T11:36:14.459000+00:00
Original source

"Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are naturally atomic on a given architecture" I guess this answer your question ?
rektbyfaith
04-02-2024, 11:36 AM #1

Archived author: jackpoz • Posted: 2024-04-02T11:36:14.459000+00:00
Original source

"Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are naturally atomic on a given architecture" I guess this answer your question ?

rektbyfaith
Administrator
0
04-02-2024, 11:36 AM
#2
Archived author: jackpoz • Posted: 2024-04-02T11:36:27.293000+00:00
Original source

the answer being "sometimes"
rektbyfaith
04-02-2024, 11:36 AM #2

Archived author: jackpoz • Posted: 2024-04-02T11:36:27.293000+00:00
Original source

the answer being "sometimes"

rektbyfaith
Administrator
0
04-02-2024, 11:36 AM
#3
Archived author: Tea • Posted: 2024-04-02T11:36:41.005000+00:00
Original source

no, not at all
rektbyfaith
04-02-2024, 11:36 AM #3

Archived author: Tea • Posted: 2024-04-02T11:36:41.005000+00:00
Original source

no, not at all

rektbyfaith
Administrator
0
04-02-2024, 11:37 AM
#4
Archived author: Tea • Posted: 2024-04-02T11:37:24.653000+00:00
Original source

its about this line specifically https://github.com/TrinityCore/TrinityCo...ueue.h#L65 and whether this breaks the safety of entire Dequeue operation or not
rektbyfaith
04-02-2024, 11:37 AM #4

Archived author: Tea • Posted: 2024-04-02T11:37:24.653000+00:00
Original source

its about this line specifically https://github.com/TrinityCore/TrinityCo...ueue.h#L65 and whether this breaks the safety of entire Dequeue operation or not

rektbyfaith
Administrator
0
04-02-2024, 11:40 AM
#5
Archived author: jackpoz • Posted: 2024-04-02T11:40:27.977000+00:00
Original source

well it's single consumer, so Dequeue is called only once at a time
rektbyfaith
04-02-2024, 11:40 AM #5

Archived author: jackpoz • Posted: 2024-04-02T11:40:27.977000+00:00
Original source

well it's single consumer, so Dequeue is called only once at a time

rektbyfaith
Administrator
0
04-02-2024, 11:41 AM
#6
Archived author: jackpoz • Posted: 2024-04-02T11:41:20.214000+00:00
Original source

so once you have next, that's going to always be valid and the whole object it points to
rektbyfaith
04-02-2024, 11:41 AM #6

Archived author: jackpoz • Posted: 2024-04-02T11:41:20.214000+00:00
Original source

so once you have next, that's going to always be valid and the whole object it points to

rektbyfaith
Administrator
0
04-02-2024, 11:41 AM
#7
Archived author: Tea • Posted: 2024-04-02T11:41:54.410000+00:00
Original source

but it has to synchronize with producers
rektbyfaith
04-02-2024, 11:41 AM #7

Archived author: Tea • Posted: 2024-04-02T11:41:54.410000+00:00
Original source

but it has to synchronize with producers

rektbyfaith
Administrator
0
04-02-2024, 11:44 AM
#8
Archived author: jackpoz • Posted: 2024-04-02T11:44:46.027000+00:00
Original source

Node* tail = _tail.load(std::memory_order_relaxed);
Node* next = tail->Next.load(std::memory_order_acquire);

Lines 60 and 61 are the only ones that you sync with producers
rektbyfaith
04-02-2024, 11:44 AM #8

Archived author: jackpoz • Posted: 2024-04-02T11:44:46.027000+00:00
Original source

Node* tail = _tail.load(std::memory_order_relaxed);
Node* next = tail->Next.load(std::memory_order_acquire);

Lines 60 and 61 are the only ones that you sync with producers

rektbyfaith
Administrator
0
04-02-2024, 11:45 AM
#9
Archived author: jackpoz • Posted: 2024-04-02T11:45:54.759000+00:00
Original source

when producer calls Enqueue(), it gives up any reference to ->Data
rektbyfaith
04-02-2024, 11:45 AM #9

Archived author: jackpoz • Posted: 2024-04-02T11:45:54.759000+00:00
Original source

when producer calls Enqueue(), it gives up any reference to ->Data

rektbyfaith
Administrator
0
04-02-2024, 11:47 AM
#10
Archived author: jackpoz • Posted: 2024-04-02T11:47:30.518000+00:00
Original source

having a single consumer allows to take a lot of shortcuts and that implementation takes them all
rektbyfaith
04-02-2024, 11:47 AM #10

Archived author: jackpoz • Posted: 2024-04-02T11:47:30.518000+00:00
Original source

having a single consumer allows to take a lot of shortcuts and that implementation takes them all

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)