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

Side by Side Diff: src/pkg/runtime/alg.go

Issue 139930043: code review 139930043: runtime: convert lock*.c to Go (Closed)
Patch Set: diff -r 91378329bf67c315e56119764bfb0edbb640a5ba https://code.google.com/p/go/ Created 10 years, 6 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 | « no previous file | src/pkg/runtime/asm_386.s » ('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 2014 The Go Authors. All rights reserved. 1 // Copyright 2014 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 package runtime 5 package runtime
6 6
7 import "unsafe" 7 import "unsafe"
8 8
9 const ( 9 const (
10 » c0 = uintptr((8-uint64(ptrSize))/4*2860486313 + (uint64(ptrSize)-4)/4*33 054211828000289) 10 » c0 = uintptr((8-ptrSize)/4*2860486313 + (ptrSize-4)/4*33054211828000289)
11 » c1 = uintptr((8-uint64(ptrSize))/4*3267000013 + (uint64(ptrSize)-4)/4*23 344194077549503) 11 » c1 = uintptr((8-ptrSize)/4*3267000013 + (ptrSize-4)/4*23344194077549503)
12 ) 12 )
13 13
14 const ( 14 const (
15 alg_MEM = iota 15 alg_MEM = iota
16 alg_MEM0 16 alg_MEM0
17 alg_MEM8 17 alg_MEM8
18 alg_MEM16 18 alg_MEM16
19 alg_MEM32 19 alg_MEM32
20 alg_MEM64 20 alg_MEM64
21 alg_MEM128 21 alg_MEM128
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 F() 275 F()
276 }, seed uintptr) uintptr { 276 }, seed uintptr) uintptr {
277 return goalg(&algarray[alg_INTER]).hash(noescape(unsafe.Pointer(&i)), un safe.Sizeof(i), seed) 277 return goalg(&algarray[alg_INTER]).hash(noescape(unsafe.Pointer(&i)), un safe.Sizeof(i), seed)
278 } 278 }
279 279
280 // Testing adapter for memclr 280 // Testing adapter for memclr
281 func memclrBytes(b []byte) { 281 func memclrBytes(b []byte) {
282 s := (*sliceStruct)(unsafe.Pointer(&b)) 282 s := (*sliceStruct)(unsafe.Pointer(&b))
283 memclr(s.array, uintptr(s.len)) 283 memclr(s.array, uintptr(s.len))
284 } 284 }
OLDNEW
« no previous file with comments | « no previous file | src/pkg/runtime/asm_386.s » ('j') | no next file with comments »

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