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

v: deprecate @VROOT in favour of @VMODROOT (#9795)

This commit is contained in:
Delyan Angelov
2021-04-19 19:01:47 +03:00
committed by GitHub
parent 4b230d16b3
commit d4f31412b7
41 changed files with 194 additions and 109 deletions

View File

@@ -3,11 +3,10 @@ module sync
import time
import rand
$if windows {
#flag -I @VROOT/thirdparty/stdatomic/win
#flag -I @VEXEROOT/thirdparty/stdatomic/win
} $else {
#flag -I @VROOT/thirdparty/stdatomic/nix
#flag -I @VEXEROOT/thirdparty/stdatomic/nix
}
$if linux {
@@ -198,7 +197,7 @@ fn (mut ch Channel) try_push_priv(src voidptr, no_block bool) ChanState {
if C.atomic_load_u16(&ch.closed) != 0 {
return .closed
}
spinloops_sem_, spinloops_ := if no_block { 1, 1 } else { spinloops, spinloops_sem }
spinloops_sem_, spinloops_ := if no_block { 1, 1 } else { sync.spinloops, sync.spinloops_sem }
mut have_swapped := false
for {
mut got_sem := false
@@ -387,7 +386,7 @@ pub fn (mut ch Channel) try_pop(dest voidptr) ChanState {
}
fn (mut ch Channel) try_pop_priv(dest voidptr, no_block bool) ChanState {
spinloops_sem_, spinloops_ := if no_block { 1, 1 } else { spinloops, spinloops_sem }
spinloops_sem_, spinloops_ := if no_block { 1, 1 } else { sync.spinloops, sync.spinloops_sem }
mut have_swapped := false
mut write_in_progress := false
for {