1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sync: channel implementation (#6074)

This commit is contained in:
Uwe Krüger
2020-08-06 15:28:19 +02:00
committed by GitHub
parent 09f1362305
commit 863cf8af60
15 changed files with 1532 additions and 51 deletions

View File

@@ -17,10 +17,17 @@ further tested.
#flag freebsd -I @VROOT/thirdparty/stdatomic/nix
#flag solaris -I @VROOT/thirdparty/stdatomic/nix
#include "atomic.h"
$if linux {
$if tinyc {
// most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir
#flag -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/9 -latomic
}
}
fn C.atomic_fetch_add_explicit() int
fn C.atomic_fetch_sub_explicit() int
#include <atomic.h>
fn C.atomic_fetch_add_explicit(voidptr, i64) i64
fn C.atomic_fetch_sub_explicit(voidptr, i64) i64
[typedef]
struct C.atomic_ullong {