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

Delta Between Two Patch Sets: src/pkg/runtime/sigqueue.goc

Issue 6441097: runtime: improved scheduler (Closed)
Left Patch Set: diff -r 80c98738fdde https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 8 months ago
Right Patch Set: diff -r 107e46216b58 https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 4 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/runtime.h ('k') | src/pkg/runtime/thread_darwin.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 // This file implements runtime support for signal handling. 5 // This file implements runtime support for signal handling.
6 // 6 //
7 // Most synchronization primitives are not available from 7 // Most synchronization primitives are not available from
8 // the signal handler (it cannot block and cannot use locks) 8 // the signal handler (it cannot block and cannot use locks)
9 // so the handler communicates with a processing goroutine 9 // so the handler communicates with a processing goroutine
10 // via struct sig, below. 10 // via struct sig, below.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 break; 105 break;
106 } 106 }
107 recv[i] = m; 107 recv[i] = m;
108 if(m != 0) 108 if(m != 0)
109 more = 1; 109 more = 1;
110 } 110 }
111 if(more) 111 if(more)
112 continue; 112 continue;
113 113
114 // Sleep waiting for more. 114 // Sleep waiting for more.
115 » » runtime·entersyscall(); 115 » » runtime·entersyscallblock();
116 runtime·notesleep(&sig); 116 runtime·notesleep(&sig);
117 runtime·exitsyscall(); 117 runtime·exitsyscall();
118 } 118 }
119 119
120 done:; 120 done:;
121 // goc requires that we fall off the end of functions 121 // goc requires that we fall off the end of functions
122 // that return values instead of using our own return 122 // that return values instead of using our own return
123 // statements. 123 // statements.
124 } 124 }
125 125
(...skipping 16 matching lines...) Expand all
142 sig.wanted[i] = ~(uint32)0; 142 sig.wanted[i] = ~(uint32)0;
143 runtime·sigenable(s); 143 runtime·sigenable(s);
144 return; 144 return;
145 } 145 }
146 146
147 if(s >= nelem(sig.wanted)*32) 147 if(s >= nelem(sig.wanted)*32)
148 return; 148 return;
149 sig.wanted[s/32] |= 1U<<(s&31); 149 sig.wanted[s/32] |= 1U<<(s&31);
150 runtime·sigenable(s); 150 runtime·sigenable(s);
151 } 151 }
LEFTRIGHT

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