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

Side by Side Diff: src/pkg/runtime/proc.c

Issue 3787046: code review 3787046: runtime: revert 6974:1f3c3696babb (Closed)
Patch Set: code review 3787046: runtime: revert 6974:1f3c3696babb Created 14 years, 2 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:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/plan9/thread.c ('k') | src/pkg/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "runtime.h" 5 #include "runtime.h"
6 #include "arch.h" 6 #include "arch.h"
7 #include "defs.h" 7 #include "defs.h"
8 #include "malloc.h" 8 #include "malloc.h"
9 #include "os.h" 9 #include "os.h"
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 runtime·schedinit(void) 104 runtime·schedinit(void)
105 { 105 {
106 int32 n; 106 int32 n;
107 byte *p; 107 byte *p;
108 108
109 runtime·allm = m; 109 runtime·allm = m;
110 m->nomemprof++; 110 m->nomemprof++;
111 111
112 runtime·mallocinit(); 112 runtime·mallocinit();
113 runtime·goargs(); 113 runtime·goargs();
114 runtime·goenvs();
114 115
115 // For debugging: 116 // For debugging:
116 // Allocate internal symbol table representation now, 117 // Allocate internal symbol table representation now,
117 // so that we don't need to call malloc when we crash. 118 // so that we don't need to call malloc when we crash.
118 // findfunc(0); 119 // findfunc(0);
119 120
120 runtime·sched.gomaxprocs = 1; 121 runtime·sched.gomaxprocs = 1;
121 p = runtime·getenv("GOMAXPROCS"); 122 p = runtime·getenv("GOMAXPROCS");
122 if(p != nil && (n = runtime·atoi(p)) != 0) 123 if(p != nil && (n = runtime·atoi(p)) != 0)
123 runtime·sched.gomaxprocs = n; 124 runtime·sched.gomaxprocs = n;
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 ret = m->id; 1230 ret = m->id;
1230 FLUSH(&ret); 1231 FLUSH(&ret);
1231 } 1232 }
1232 1233
1233 void 1234 void
1234 runtime·Goroutines(int32 ret) 1235 runtime·Goroutines(int32 ret)
1235 { 1236 {
1236 ret = runtime·sched.gcount; 1237 ret = runtime·sched.gcount;
1237 FLUSH(&ret); 1238 FLUSH(&ret);
1238 } 1239 }
OLDNEW
« no previous file with comments | « src/pkg/runtime/plan9/thread.c ('k') | src/pkg/runtime/runtime.h » ('j') | no next file with comments »

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