diff --git a/src/pkg/runtime/defs_openbsd.go b/src/pkg/runtime/defs_openbsd.go index 39224c988c..cf4e06d37b 100644 --- a/src/pkg/runtime/defs_openbsd.go +++ b/src/pkg/runtime/defs_openbsd.go @@ -104,7 +104,7 @@ const ( EVFILT_WRITE = C.EVFILT_WRITE ) -type TforkT C.struct___tfork +type Tfork C.struct___tfork type SigaltstackT C.struct_sigaltstack type Sigcontext C.struct_sigcontext @@ -118,4 +118,4 @@ type Timespec C.struct_timespec type Timeval C.struct_timeval type Itimerval C.struct_itimerval -type KeventT C.struct_kevent +type Kevent C.struct_kevent diff --git a/src/pkg/runtime/defs_openbsd_386.h b/src/pkg/runtime/defs_openbsd_386.h index 6b77e0084a..669a35c357 100644 --- a/src/pkg/runtime/defs_openbsd_386.h +++ b/src/pkg/runtime/defs_openbsd_386.h @@ -81,7 +81,7 @@ enum { EVFILT_WRITE = -0x2, }; -typedef struct TforkT TforkT; +typedef struct Tfork Tfork; typedef struct SigaltstackT SigaltstackT; typedef struct Sigcontext Sigcontext; typedef struct Siginfo Siginfo; @@ -93,7 +93,7 @@ typedef struct KeventT KeventT; #pragma pack on -struct TforkT { +struct Tfork { byte *tf_tcb; int32 *tf_tid; byte *tf_stack; diff --git a/src/pkg/runtime/defs_openbsd_amd64.h b/src/pkg/runtime/defs_openbsd_amd64.h index 761e8e47df..9877f8b4c2 100644 --- a/src/pkg/runtime/defs_openbsd_amd64.h +++ b/src/pkg/runtime/defs_openbsd_amd64.h @@ -81,7 +81,7 @@ enum { EVFILT_WRITE = -0x2, }; -typedef struct TforkT TforkT; +typedef struct Tfork Tfork; typedef struct SigaltstackT SigaltstackT; typedef struct Sigcontext Sigcontext; typedef struct Siginfo Siginfo; @@ -93,7 +93,7 @@ typedef struct KeventT KeventT; #pragma pack on -struct TforkT { +struct Tfork { byte *tf_tcb; int32 *tf_tid; byte *tf_stack; diff --git a/src/pkg/runtime/os_openbsd.c b/src/pkg/runtime/os_openbsd.c index dbd12a1282..a746385314 100644 --- a/src/pkg/runtime/os_openbsd.c +++ b/src/pkg/runtime/os_openbsd.c @@ -26,7 +26,7 @@ extern SigTab runtime·sigtab[]; static Sigset sigset_none; static Sigset sigset_all = ~(Sigset)0; -extern int32 runtime·tfork(TforkT *param, uintptr psize, M *mp, G *gp, void (*fn)(void)); +extern int32 runtime·tfork(void *param, uintptr psize, M *mp, G *gp, void (*fn)(void)); extern int32 runtime·thrsleep(void *ident, int32 clock_id, void *tsp, void *lock, const int32 *abort); extern int32 runtime·thrwakeup(void *ident, int32 n); @@ -130,7 +130,7 @@ runtime·semawakeup(M *mp) void runtime·newosproc(M *mp, void *stk) { - TforkT param; + Tfork param; Sigset oset; int32 ret; @@ -147,7 +147,7 @@ runtime·newosproc(M *mp, void *stk) param.tf_stack = stk; oset = runtime·sigprocmask(SIG_SETMASK, sigset_all); - ret = runtime·tfork(¶m, sizeof(param), mp, mp->g0, runtime·mstart); + ret = runtime·tfork((byte*)¶m, sizeof(param), mp, mp->g0, runtime·mstart); runtime·sigprocmask(SIG_SETMASK, oset); if(ret < 0) { diff --git a/src/pkg/runtime/os_openbsd.go b/src/pkg/runtime/os_openbsd.go index d3923aa615..681bdde82e 100644 --- a/src/pkg/runtime/os_openbsd.go +++ b/src/pkg/runtime/os_openbsd.go @@ -15,7 +15,7 @@ func raise(sig int32) func kqueue() int32 func kevent(fd int32, ev1 unsafe.Pointer, nev1 int32, ev2 unsafe.Pointer, nev2 int32, ts unsafe.Pointer) int32 func closeonexec(fd int32) -func tfork(param *tforkt, psize uintptr, mm, gg, fn unsafe.Pointer) int32 +func tfork(param unsafe.Pointer, psize uintptr, mm, gg, fn unsafe.Pointer) int32 func thrsleep(ident unsafe.Pointer, clock_id int32, tsp, lock, abort unsafe.Pointer) int32 func thrwakeup(ident unsafe.Pointer, n int32) int32