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

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

Issue 127490043: code review 127490043: runtime: convert Gosched to Go (Closed)
Patch Set: diff -r e34ca40b4857b9ba020e0cacf182044599cb0a1a https://dvyukov%40google.com@code.google.com/p/go/ Created 10 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:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/stack.c ('k') | no next file » | 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 // Declarations for runtime services implemented in C or assembly. 9 // Declarations for runtime services implemented in C or assembly.
10 // C implementations of these functions are in stubs.goc. 10 // C implementations of these functions are in stubs.goc.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // m->ptrarg[x]. Return values can be passed in those 61 // m->ptrarg[x]. Return values can be passed in those
62 // same slots. 62 // same slots.
63 var ( 63 var (
64 mcacheRefill_m, 64 mcacheRefill_m,
65 largeAlloc_m, 65 largeAlloc_m,
66 mprofMalloc_m, 66 mprofMalloc_m,
67 gc_m, 67 gc_m,
68 setFinalizer_m, 68 setFinalizer_m,
69 markallocated_m, 69 markallocated_m,
70 unrollgcprog_m, 70 unrollgcprog_m,
71 » unrollgcproginplace_m mFunction 71 » unrollgcproginplace_m,
72 » gosched_m mFunction
72 ) 73 )
73 74
74 // memclr clears n bytes starting at ptr. 75 // memclr clears n bytes starting at ptr.
75 // in memclr_*.s 76 // in memclr_*.s
76 //go:noescape 77 //go:noescape
77 func memclr(ptr unsafe.Pointer, n uintptr) 78 func memclr(ptr unsafe.Pointer, n uintptr)
78 79
79 func racemalloc(p unsafe.Pointer, size uintptr) 80 func racemalloc(p unsafe.Pointer, size uintptr)
80 func tracealloc(p unsafe.Pointer, size uintptr, typ *_type) 81 func tracealloc(p unsafe.Pointer, size uintptr, typ *_type)
81 82
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // compiles down to a single xor instruction. 156 // compiles down to a single xor instruction.
156 // USE CAREFULLY! 157 // USE CAREFULLY!
157 func noescape(p unsafe.Pointer) unsafe.Pointer { 158 func noescape(p unsafe.Pointer) unsafe.Pointer {
158 x := uintptr(p) 159 x := uintptr(p)
159 return unsafe.Pointer(x ^ 0) 160 return unsafe.Pointer(x ^ 0)
160 } 161 }
161 162
162 // gopersistentalloc allocates a permanent (not garbage collected) 163 // gopersistentalloc allocates a permanent (not garbage collected)
163 // memory region of size n. Use wisely! 164 // memory region of size n. Use wisely!
164 func gopersistentalloc(n uintptr) unsafe.Pointer 165 func gopersistentalloc(n uintptr) unsafe.Pointer
OLDNEW
« no previous file with comments | « src/pkg/runtime/stack.c ('k') | no next file » | no next file with comments »

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