aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_ppc64x.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_linux_ppc64x.go')
-rw-r--r--src/syscall/syscall_linux_ppc64x.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/syscall/syscall_linux_ppc64x.go b/src/syscall/syscall_linux_ppc64x.go
index 65ba3567b2..ca101067be 100644
--- a/src/syscall/syscall_linux_ppc64x.go
+++ b/src/syscall/syscall_linux_ppc64x.go
@@ -80,6 +80,30 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
return
}
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, 0)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
func (r *PtraceRegs) PC() uint64 { return r.Nip }
func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }