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

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

Issue 68980043: syscall: add mlock, munlock, mlockall, munlockall and mprotect to OSX (Closed)
Patch Set: syscall: add mlock, munlock, mlockall, munlockall and mprotect to OSX Created 10 years, 1 month 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/syscall/zsyscall_darwin_386.go ('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 // mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go 1 // mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
3 3
4 package syscall 4 package syscall
5 5
6 import "unsafe" 6 import "unsafe"
7 7
8 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 8 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9 9
10 func getgroups(ngid int, gid *_Gid_t) (n int, err error) { 10 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 } 817 }
818 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mod e), uintptr(dev)) 818 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mod e), uintptr(dev))
819 if e1 != 0 { 819 if e1 != 0 {
820 err = e1 820 err = e1
821 } 821 }
822 return 822 return
823 } 823 }
824 824
825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
826 826
827 func Mlock(b []byte) (err error) {
828 var _p0 unsafe.Pointer
829 if len(b) > 0 {
830 _p0 = unsafe.Pointer(&b[0])
831 } else {
832 _p0 = unsafe.Pointer(&_zero)
833 }
834 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
835 if e1 != 0 {
836 err = e1
837 }
838 return
839 }
840
841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
842
843 func Mlockall(flags int) (err error) {
844 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
845 if e1 != 0 {
846 err = e1
847 }
848 return
849 }
850
851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
852
853 func Mprotect(b []byte, prot int) (err error) {
854 var _p0 unsafe.Pointer
855 if len(b) > 0 {
856 _p0 = unsafe.Pointer(&b[0])
857 } else {
858 _p0 = unsafe.Pointer(&_zero)
859 }
860 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr (prot))
861 if e1 != 0 {
862 err = e1
863 }
864 return
865 }
866
867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
868
869 func Munlock(b []byte) (err error) {
870 var _p0 unsafe.Pointer
871 if len(b) > 0 {
872 _p0 = unsafe.Pointer(&b[0])
873 } else {
874 _p0 = unsafe.Pointer(&_zero)
875 }
876 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
877 if e1 != 0 {
878 err = e1
879 }
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func Munlockall() (err error) {
886 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
887 if e1 != 0 {
888 err = e1
889 }
890 return
891 }
892
893 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
894
827 func Open(path string, mode int, perm uint32) (fd int, err error) { 895 func Open(path string, mode int, perm uint32) (fd int, err error) {
828 var _p0 *byte 896 var _p0 *byte
829 _p0, err = BytePtrFromString(path) 897 _p0, err = BytePtrFromString(path)
830 if err != nil { 898 if err != nil {
831 return 899 return
832 } 900 }
833 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mod e), uintptr(perm)) 901 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mod e), uintptr(perm))
834 fd = int(r0) 902 fd = int(r0)
835 if e1 != 0 { 903 if e1 != 0 {
836 err = e1 904 err = e1
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 1394
1327 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { 1395 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
1328 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1396 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1329 sec = int64(r0) 1397 sec = int64(r0)
1330 usec = int32(r1) 1398 usec = int32(r1)
1331 if e1 != 0 { 1399 if e1 != 0 {
1332 err = e1 1400 err = e1
1333 } 1401 }
1334 return 1402 return
1335 } 1403 }
OLDNEW
« no previous file with comments | « src/pkg/syscall/zsyscall_darwin_386.go ('k') | no next file » | no next file with comments »

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