Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(243)

Delta Between Two Patch Sets: src/pkg/runtime/runtime.h

Issue 5334051: code review 5334051: runtime: add timer support, use for package time (Closed)
Left Patch Set: diff -r 41fb9e7d3027 https://go.googlecode.com/hg Created 13 years, 5 months ago
Right Patch Set: diff -r 9870fbad1533 https://go.googlecode.com/hg Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/proc.c ('k') | src/pkg/runtime/time.goc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 /* 5 /*
6 * basic types 6 * basic types
7 */ 7 */
8 typedef signed char int8; 8 typedef signed char int8;
9 typedef unsigned char uint8; 9 typedef unsigned char uint8;
10 typedef signed short int16; 10 typedef signed short int16;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 struct Timers 320 struct Timers
321 { 321 {
322 Lock; 322 Lock;
323 G *timerproc; 323 G *timerproc;
324 bool sleeping; 324 bool sleeping;
325 bool rescheduling; 325 bool rescheduling;
326 Note waitnote; 326 Note waitnote;
327 Timer **t; 327 Timer **t;
328 int32 len; 328 int32 len;
329 int32 cap; 329 int32 cap;
330 Timer **pin;
dvyukov 2011/11/08 09:46:45 remove
331 }; 330 };
332 331
333 // Package time knows the layout of this structure. 332 // Package time knows the layout of this structure.
334 // If this struct changes, adjust ../time/sleep.go:/runtimeTimer. 333 // If this struct changes, adjust ../time/sleep.go:/runtimeTimer.
335 struct Timer 334 struct Timer
336 { 335 {
337 int32 i; // heap index 336 int32 i; // heap index
338 337
339 // Timer wakes up at when, and then at when+period, ... (period > 0 only ) 338 // Timer wakes up at when, and then at when+period, ... (period > 0 only )
340 // each time calling f(now, arg) in the timer goroutine, so f must be 339 // each time calling f(now, arg) in the timer goroutine, so f must be
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 680
682 Hchan* runtime·makechan_c(ChanType*, int64); 681 Hchan* runtime·makechan_c(ChanType*, int64);
683 void runtime·chansend(ChanType*, Hchan*, byte*, bool*); 682 void runtime·chansend(ChanType*, Hchan*, byte*, bool*);
684 void runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*); 683 void runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*);
685 int32 runtime·chanlen(Hchan*); 684 int32 runtime·chanlen(Hchan*);
686 int32 runtime·chancap(Hchan*); 685 int32 runtime·chancap(Hchan*);
687 bool runtime·showframe(Func*); 686 bool runtime·showframe(Func*);
688 687
689 void runtime·ifaceE2I(struct InterfaceType*, Eface, Iface*); 688 void runtime·ifaceE2I(struct InterfaceType*, Eface, Iface*);
690 689
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b