mirror of https://github.com/golang/go.git
runtime: better debug output for inconsistent Note
Update #5139. Double wakeup on Note was reported several times, but no reliable reproducer. There also was a strange report about weird value of epoll fd. Maybe it's corruption of global data... R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12182043
This commit is contained in:
parent
658d19a53f
commit
98d94b589c
|
|
@ -118,8 +118,13 @@ runtime·noteclear(Note *n)
|
|||
void
|
||||
runtime·notewakeup(Note *n)
|
||||
{
|
||||
if(runtime·xchg((uint32*)&n->key, 1))
|
||||
uint32 old;
|
||||
|
||||
old = runtime·xchg((uint32*)&n->key, 1);
|
||||
if(old != 0) {
|
||||
runtime·printf("notewakeup - double wakeup (%d)\n", old);
|
||||
runtime·throw("notewakeup - double wakeup");
|
||||
}
|
||||
runtime·futexwakeup((uint32*)&n->key, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue