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

Side by Side Diff: src/pkg/syscall/syscall_unix.go

Issue 120570043: code review 120570043: syscall: fix typo in comment (Closed)
Patch Set: diff -r 198c617ade1d https://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 | « no previous file | 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 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 // +build darwin dragonfly freebsd linux netbsd openbsd solaris 5 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 6
7 package syscall 7 package syscall
8 8
9 import ( 9 import (
10 "runtime" 10 "runtime"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return nil, errno 49 return nil, errno
50 } 50 }
51 51
52 // Slice memory layout 52 // Slice memory layout
53 var sl = struct { 53 var sl = struct {
54 addr uintptr 54 addr uintptr
55 len int 55 len int
56 cap int 56 cap int
57 }{addr, length, length} 57 }{addr, length, length}
58 58
59 » // Use unsafeto turn sl into a []byte. 59 » // Use unsafe to turn sl into a []byte.
60 b := *(*[]byte)(unsafe.Pointer(&sl)) 60 b := *(*[]byte)(unsafe.Pointer(&sl))
61 61
62 // Register mapping in m and return it. 62 // Register mapping in m and return it.
63 p := &b[cap(b)-1] 63 p := &b[cap(b)-1]
64 m.Lock() 64 m.Lock()
65 defer m.Unlock() 65 defer m.Unlock()
66 m.active[p] = b 66 m.active[p] = b
67 return b, nil 67 return b, nil
68 } 68 }
69 69
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 291
292 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e rror) { 292 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e rror) {
293 if raceenabled { 293 if raceenabled {
294 raceReleaseMerge(unsafe.Pointer(&ioSync)) 294 raceReleaseMerge(unsafe.Pointer(&ioSync))
295 } 295 }
296 return sendfile(outfd, infd, offset, count) 296 return sendfile(outfd, infd, offset, count)
297 } 297 }
298 298
299 var ioSync int64 299 var ioSync int64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

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