diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-25 20:25:22 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-25 20:25:22 +0400 |
| commit | 9601abaf8b3d454f6bf84ba9f5e07c11de16ef14 (patch) | |
| tree | 6a3f841db7e12e93b7e95e6cac4f9c8fb94b7247 /src/pkg/runtime/runtime.h | |
| parent | ebac0e6f302c52e97a212fab8837a73f31edc884 (diff) | |
| download | go-9601abaf8b3d454f6bf84ba9f5e07c11de16ef14.tar.xz | |
runtime: convert timers to Go
LGTM=rsc
R=golang-codereviews, ruiu, rsc, daniel.morsing
CC=golang-codereviews, khr
https://golang.org/cl/123700044
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index d7709ae3c1..beafc76637 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -92,8 +92,6 @@ typedef struct Complex64 Complex64; typedef struct Complex128 Complex128; typedef struct LibCall LibCall; typedef struct WinCallbackContext WinCallbackContext; -typedef struct Timers Timers; -typedef struct Timer Timer; typedef struct GCStats GCStats; typedef struct LFNode LFNode; typedef struct ParFor ParFor; @@ -519,35 +517,6 @@ enum { }; #endif -struct Timers -{ - Lock lock; - G *timerproc; - bool sleeping; - bool rescheduling; - Note waitnote; - Timer **t; - int32 len; - int32 cap; -}; - -// Package time knows the layout of this structure. -// If this struct changes, adjust ../time/sleep.go:/runtimeTimer. -// For GOOS=nacl, package syscall knows the layout of this structure. -// If this struct changes, adjust ../syscall/net_nacl.go:/runtimeTimer. -struct Timer -{ - int32 i; // heap index - - // Timer wakes up at when, and then at when+period, ... (period > 0 only) - // each time calling f(now, arg) in the timer goroutine, so f must be - // a well-behaved function and not block. - int64 when; - int64 period; - FuncVal *fv; - Eface arg; -}; - // Lock-free stack node. struct LFNode { @@ -965,8 +934,6 @@ int64 runtime·cputicks(void); int64 runtime·tickspersecond(void); void runtime·blockevent(int64, int32); extern int64 runtime·blockprofilerate; -void runtime·addtimer(Timer*); -bool runtime·deltimer(Timer*); G* runtime·netpoll(bool); void runtime·netpollinit(void); int32 runtime·netpollopen(uintptr, PollDesc*); |
