aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/lock_futex.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-12-27 20:58:00 -0800
committerKeith Randall <khr@golang.org>2014-12-28 06:16:16 +0000
commitb2a950bb7343a46ff3edd8502fe2f02fc051a308 (patch)
tree97511001e7aa590d22b1b0d8c962467319180681 /src/runtime/lock_futex.go
parentddef2d27fec52c271ee72911e60b07f5f62cf3cb (diff)
downloadgo-b2a950bb7343a46ff3edd8502fe2f02fc051a308.tar.gz
go-b2a950bb7343a46ff3edd8502fe2f02fc051a308.zip
runtime: rename gothrow to throw
Rename "gothrow" to "throw" now that the C version of "throw" is no longer needed. This change is purely mechanical except in panic.go where the old version of "throw" has been deleted. sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3 Reviewed-on: https://go-review.googlesource.com/2150 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/runtime/lock_futex.go')
-rw-r--r--src/runtime/lock_futex.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go
index 11c3a3f06e..6e1f1e9da4 100644
--- a/src/runtime/lock_futex.go
+++ b/src/runtime/lock_futex.go
@@ -43,7 +43,7 @@ func lock(l *mutex) {
gp := getg()
if gp.m.locks < 0 {
- gothrow("runtime·lock: lock count")
+ throw("runtime·lock: lock count")
}
gp.m.locks++
@@ -102,7 +102,7 @@ func lock(l *mutex) {
func unlock(l *mutex) {
v := xchg(key32(&l.key), mutex_unlocked)
if v == mutex_unlocked {
- gothrow("unlock of unlocked lock")
+ throw("unlock of unlocked lock")
}
if v == mutex_sleeping {
futexwakeup(key32(&l.key), 1)
@@ -111,7 +111,7 @@ func unlock(l *mutex) {
gp := getg()
gp.m.locks--
if gp.m.locks < 0 {
- gothrow("runtime·unlock: lock count")
+ throw("runtime·unlock: lock count")
}
if gp.m.locks == 0 && gp.preempt { // restore the preemption request in case we've cleared it in newstack
gp.stackguard0 = stackPreempt
@@ -127,7 +127,7 @@ func notewakeup(n *note) {
old := xchg(key32(&n.key), 1)
if old != 0 {
print("notewakeup - double wakeup (", old, ")\n")
- gothrow("notewakeup - double wakeup")
+ throw("notewakeup - double wakeup")
}
futexwakeup(key32(&n.key), 1)
}
@@ -135,7 +135,7 @@ func notewakeup(n *note) {
func notesleep(n *note) {
gp := getg()
if gp != gp.m.g0 {
- gothrow("notesleep not on g0")
+ throw("notesleep not on g0")
}
for atomicload(key32(&n.key)) == 0 {
gp.m.blocked = true
@@ -181,7 +181,7 @@ func notetsleep_internal(n *note, ns int64) bool {
func notetsleep(n *note, ns int64) bool {
gp := getg()
if gp != gp.m.g0 && gp.m.gcing == 0 {
- gothrow("notetsleep not on g0")
+ throw("notetsleep not on g0")
}
return notetsleep_internal(n, ns)
@@ -192,7 +192,7 @@ func notetsleep(n *note, ns int64) bool {
func notetsleepg(n *note, ns int64) bool {
gp := getg()
if gp == gp.m.g0 {
- gothrow("notetsleepg on g0")
+ throw("notetsleepg on g0")
}
entersyscallblock(0)