diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /libgo/go/runtime/lock_futex.go | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-devel/autopar_devel.zip gcc-devel/autopar_devel.tar.gz gcc-devel/autopar_devel.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'libgo/go/runtime/lock_futex.go')
-rw-r--r-- | libgo/go/runtime/lock_futex.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libgo/go/runtime/lock_futex.go b/libgo/go/runtime/lock_futex.go index f672efd..21d7e0d 100644 --- a/libgo/go/runtime/lock_futex.go +++ b/libgo/go/runtime/lock_futex.go @@ -55,6 +55,10 @@ func key32(p *uintptr) *uint32 { } func lock(l *mutex) { + lockWithRank(l, getLockRank(l)) +} + +func lock2(l *mutex) { gp := getg() if gp.m.locks < 0 { @@ -115,6 +119,10 @@ func lock(l *mutex) { } func unlock(l *mutex) { + unlockWithRank(l) +} + +func unlock2(l *mutex) { v := atomic.Xchg(key32(&l.key), mutex_unlocked) if v == mutex_unlocked { throw("unlock of unlocked lock") @@ -241,8 +249,8 @@ func notetsleepg(n *note, ns int64) bool { return ok } -func beforeIdle(int64) bool { - return false +func beforeIdle(int64) (*g, bool) { + return nil, false } func checkTimeouts() {} |