diff options
Diffstat (limited to 'src/pkg/runtime/lock_futex.c')
| -rw-r--r-- | src/pkg/runtime/lock_futex.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pkg/runtime/lock_futex.c b/src/pkg/runtime/lock_futex.c index 95d590bae9..2265607000 100644 --- a/src/pkg/runtime/lock_futex.c +++ b/src/pkg/runtime/lock_futex.c @@ -159,3 +159,16 @@ runtime·notetsleep(Note *n, int64 ns) runtime·setprof(true); return runtime·atomicload((uint32*)&n->key) != 0; } + +bool +runtime·notetsleepg(Note *n, int64 ns) +{ + bool res; + + if(g == m->g0) + runtime·throw("notetsleepg on g0"); + runtime·entersyscallblock(); + res = runtime·notetsleep(n, ns); + runtime·exitsyscall(); + return res; +} |
