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

Delta Between Two Patch Sets: src/pkg/runtime/proc.c

Issue 12418043: code review 12418043: net: add special netFD mutex (Closed)
Left Patch Set: Created 11 years, 7 months ago
Right Patch Set: diff -r 5a51d54e34bb https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 7 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:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/netpoll.goc ('k') | src/pkg/runtime/race.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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_GOARCH.h" 6 #include "arch_GOARCH.h"
7 #include "malloc.h" 7 #include "malloc.h"
8 #include "stack.h" 8 #include "stack.h"
9 #include "race.h" 9 #include "race.h"
10 #include "type.h" 10 #include "type.h"
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 if(n > MaxGomaxprocs) 1829 if(n > MaxGomaxprocs)
1830 n = MaxGomaxprocs; 1830 n = MaxGomaxprocs;
1831 runtime·lock(&runtime·sched); 1831 runtime·lock(&runtime·sched);
1832 ret = runtime·gomaxprocs; 1832 ret = runtime·gomaxprocs;
1833 if(n <= 0 || n == ret) { 1833 if(n <= 0 || n == ret) {
1834 runtime·unlock(&runtime·sched); 1834 runtime·unlock(&runtime·sched);
1835 return ret; 1835 return ret;
1836 } 1836 }
1837 runtime·unlock(&runtime·sched); 1837 runtime·unlock(&runtime·sched);
1838 1838
1839 » runtime·semacquire(&runtime·worldsema); 1839 » runtime·semacquire(&runtime·worldsema, false);
1840 m->gcing = 1; 1840 m->gcing = 1;
1841 runtime·stoptheworld(); 1841 runtime·stoptheworld();
1842 newprocs = n; 1842 newprocs = n;
1843 m->gcing = 0; 1843 m->gcing = 0;
1844 runtime·semrelease(&runtime·worldsema); 1844 runtime·semrelease(&runtime·worldsema);
1845 runtime·starttheworld(); 1845 runtime·starttheworld();
1846 1846
1847 return ret; 1847 return ret;
1848 } 1848 }
1849 1849
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 bool 2631 bool
2632 runtime·topofstack(Func *f) 2632 runtime·topofstack(Func *f)
2633 { 2633 {
2634 return f->entry == (uintptr)runtime·goexit || 2634 return f->entry == (uintptr)runtime·goexit ||
2635 f->entry == (uintptr)runtime·mstart || 2635 f->entry == (uintptr)runtime·mstart ||
2636 f->entry == (uintptr)runtime·mcall || 2636 f->entry == (uintptr)runtime·mcall ||
2637 f->entry == (uintptr)runtime·morestack || 2637 f->entry == (uintptr)runtime·morestack ||
2638 f->entry == (uintptr)runtime·lessstack || 2638 f->entry == (uintptr)runtime·lessstack ||
2639 f->entry == (uintptr)_rt0_go; 2639 f->entry == (uintptr)_rt0_go;
2640 } 2640 }
LEFTRIGHT

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