mirror of
https://github.com/golang/go
synced 2024-11-18 08:54:45 -07:00
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
Block a user