OLD | NEW |
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 freebsd openbsd |
| 6 |
5 // BSD system call wrappers shared by *BSD based systems | 7 // BSD system call wrappers shared by *BSD based systems |
6 // including OS X (Darwin) and FreeBSD. Like the other | 8 // including OS X (Darwin) and FreeBSD. Like the other |
7 // syscall_*.go files it is compiled as Go code but also | 9 // syscall_*.go files it is compiled as Go code but also |
8 // used as input to mksyscall which parses the //sys | 10 // used as input to mksyscall which parses the //sys |
9 // lines and generates system call stubs. | 11 // lines and generates system call stubs. |
10 | 12 |
11 package syscall | 13 package syscall |
12 | 14 |
13 import "unsafe" | 15 import "unsafe" |
14 | 16 |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 munmap: munmap, | 620 munmap: munmap, |
619 } | 621 } |
620 | 622 |
621 func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
rrno int) { | 623 func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
rrno int) { |
622 return mapper.Mmap(fd, offset, length, prot, flags) | 624 return mapper.Mmap(fd, offset, length, prot, flags) |
623 } | 625 } |
624 | 626 |
625 func Munmap(b []byte) (errno int) { | 627 func Munmap(b []byte) (errno int) { |
626 return mapper.Munmap(b) | 628 return mapper.Munmap(b) |
627 } | 629 } |
OLD | NEW |