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

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

Issue 7543043: code review 7543043: runtime: faster & safer hash function (Closed)
Left Patch Set: diff -r 479ac38abfc9 https://code.google.com/p/go/ Created 12 years, 1 month ago
Right Patch Set: diff -r a45e271add6c https://code.google.com/p/go/ Created 12 years 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/runtime.c ('k') | src/pkg/runtime/sys_darwin_386.s » ('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 #include "runtime.h" 5 #include "runtime.h"
6 #include "defs_GOOS_GOARCH.h" 6 #include "defs_GOOS_GOARCH.h"
7 #include "signals_GOOS.h" 7 #include "signals_GOOS.h"
8 #include "os_GOOS.h" 8 #include "os_GOOS.h"
9 9
10 void 10 void
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 runtime·throw("rt_sigaction failure"); 149 runtime·throw("rt_sigaction failure");
150 } 150 }
151 151
152 #define AT_NULL 0 152 #define AT_NULL 0
153 #define AT_RANDOM 25 153 #define AT_RANDOM 25
154 #define AT_SYSINFO 32 154 #define AT_SYSINFO 32
155 extern uint32 runtime·_vdso; 155 extern uint32 runtime·_vdso;
156 156
157 #pragma textflag 7 157 #pragma textflag 7
158 void 158 void
159 runtime·linux_setup_vdso(int32 argc, void *argv_list) 159 runtime·linux_setup_vdso(int32 argc, byte **argv)
160 { 160 {
161 byte **argv = &argv_list;
162 byte **envp; 161 byte **envp;
163 uint32 *auxv; 162 uint32 *auxv;
164 163
165 // skip envp to get to ELF auxiliary vector. 164 // skip envp to get to ELF auxiliary vector.
166 for(envp = &argv[argc+1]; *envp != nil; envp++) 165 for(envp = &argv[argc+1]; *envp != nil; envp++)
167 ; 166 ;
168 envp++; 167 envp++;
169 ········ 168 ········
170 for(auxv=(uint32*)envp; auxv[0] != AT_NULL; auxv += 2) { 169 for(auxv=(uint32*)envp; auxv[0] != AT_NULL; auxv += 2) {
171 if(auxv[0] == AT_SYSINFO) { 170 if(auxv[0] == AT_SYSINFO) {
172 runtime·_vdso = auxv[1]; 171 runtime·_vdso = auxv[1];
173 continue; 172 continue;
174 } 173 }
175 » » if (auxv[0] == AT_RANDOM) { 174 » » if(auxv[0] == AT_RANDOM) {
176 » » » runtime·at_random_data = (byte*)auxv[1]; 175 » » » runtime·startup_random_data = (byte*)auxv[1];
176 » » » runtime·startup_random_data_len = 16;
177 continue; 177 continue;
178 } 178 }
179 } 179 }
180 } 180 }
LEFTRIGHT

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