From e97d677b4eaa6db4d70ae1d855d2cc5a4b0fdeff Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Mon, 22 Jul 2013 23:02:27 +0400 Subject: runtime: introduce notetsleepg function notetsleepg is the same as notetsleep, but is called on user g. It includes entersyscall/exitsyscall and will help to avoid split stack functions in syscall status. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11681043 --- src/pkg/runtime/runtime.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pkg/runtime/runtime.h') diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index f8d45ba819..244b548489 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -905,11 +905,15 @@ void runtime·unlock(Lock*); * wake up early, it must wait to call noteclear until it * can be sure that no other goroutine is calling * notewakeup. + * + * notesleep/notetsleep are generally called on g0, + * notetsleepg is similar to notetsleep but is called on user g. */ void runtime·noteclear(Note*); void runtime·notesleep(Note*); void runtime·notewakeup(Note*); bool runtime·notetsleep(Note*, int64); // false - timeout +bool runtime·notetsleepg(Note*, int64); // false - timeout /* * low-level synchronization for implementing the above -- cgit v1.3