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

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

Issue 6813046: code review 6813046: net: use WriteNB on non-blocking sockets (Closed)
Patch Set: diff -r 8df088298a0c https://code.google.com/p/go Created 11 years, 5 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/net/fd_unix.go ('k') | src/pkg/syscall/syscall_freebsd.go » ('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 2009,2010 The Go Authors. All rights reserved. 1 // Copyright 2009,2010 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 // Darwin system calls. 5 // Darwin system calls.
6 // This file is compiled as ordinary Go code, 6 // This file is compiled as ordinary Go code,
7 // but it is also input to mksyscall, 7 // but it is also input to mksyscall,
8 // which parses the //sys lines and generates system call stubs. 8 // which parses the //sys lines and generates system call stubs.
9 // Note that sometimes we use a lowercase //sys name and wrap 9 // Note that sometimes we use a lowercase //sys name and wrap
10 // it in our own nicer implementation, either here or in 10 // it in our own nicer implementation, either here or in
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e rror) { 100 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e rror) {
101 return -1, ENOSYS 101 return -1, ENOSYS
102 } 102 }
103 103
104 /* 104 /*
105 * Wrapped 105 * Wrapped
106 */ 106 */
107 107
108 //sys kill(pid int, signum int, posix int) (err error) 108 //sys kill(pid int, signum int, posix int) (err error)
109 109
110 func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1) } 110 func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum) , 1) }
111 func WriteNB(fd int, p []byte) (n int, err error) { return Write(fd, p) }
minux1 2012/10/28 16:56:46 please provide docs for WriteNB. and stress the fa
111 112
112 /* 113 /*
113 * Exposed directly 114 * Exposed directly
114 */ 115 */
115 //sys Access(path string, mode uint32) (err error) 116 //sys Access(path string, mode uint32) (err error)
116 //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) 117 //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
117 //sys Chdir(path string) (err error) 118 //sys Chdir(path string) (err error)
118 //sys Chflags(path string, flags int) (err error) 119 //sys Chflags(path string, flags int) (err error)
119 //sys Chmod(path string, mode uint32) (err error) 120 //sys Chmod(path string, mode uint32) (err error)
120 //sys Chown(path string, uid int, gid int) (err error) 121 //sys Chown(path string, uid int, gid int) (err error)
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // Poll_nocancel 395 // Poll_nocancel
395 // Msgsnd_nocancel 396 // Msgsnd_nocancel
396 // Msgrcv_nocancel 397 // Msgrcv_nocancel
397 // Sem_wait_nocancel 398 // Sem_wait_nocancel
398 // Aio_suspend_nocancel 399 // Aio_suspend_nocancel
399 // __sigwait_nocancel 400 // __sigwait_nocancel
400 // __semwait_signal_nocancel 401 // __semwait_signal_nocancel
401 // __mac_mount 402 // __mac_mount
402 // __mac_get_mount 403 // __mac_get_mount
403 // __mac_getfsstat 404 // __mac_getfsstat
OLDNEW
« no previous file with comments | « src/pkg/net/fd_unix.go ('k') | src/pkg/syscall/syscall_freebsd.go » ('j') | no next file with comments »

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