diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-07-22 23:02:27 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-07-22 23:02:27 +0400 |
| commit | e97d677b4eaa6db4d70ae1d855d2cc5a4b0fdeff (patch) | |
| tree | 5574b0886619a085bd84ff0fa70b08abd51fc6f6 /src/pkg/runtime/runtime.h | |
| parent | 9fe4a9ecdd674efafc173f3c7e99f7b34a6c544a (diff) | |
| download | go-e97d677b4eaa6db4d70ae1d855d2cc5a4b0fdeff.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
