Commit 98d94b58 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

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
parent 658d19a5
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment