mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-01-11 12:28:41 +00:00
Signed-off-by: Dennis Eichhorn <spl1nes.com@googlemail.com>
This commit is contained in:
parent
ecc5c87e8f
commit
aa5dd6d6b3
|
|
@ -182,7 +182,7 @@ Lockless version
|
||||||
atomic_int counter = 0;
|
atomic_int counter = 0;
|
||||||
|
|
||||||
void increment_counter() {
|
void increment_counter() {
|
||||||
atomic_fetch_add(&counter, 1); // Atomic operation, no locking needed
|
atomic_fetch_add(&counter, 1);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user