Commit 2758cb75 authored by Matthew Dempsky's avatar Matthew Dempsky Committed by Ian Lance Taylor

runtime: fix openbsd build

LGTM=iant
R=iant, minux
CC=golang-codereviews, jsing
https://golang.org/cl/135230043
parent 0b9e4723
...@@ -104,7 +104,7 @@ const ( ...@@ -104,7 +104,7 @@ const (
EVFILT_WRITE = C.EVFILT_WRITE EVFILT_WRITE = C.EVFILT_WRITE
) )
type Tfork C.struct___tfork type TforkT C.struct___tfork
type SigaltstackT C.struct_sigaltstack type SigaltstackT C.struct_sigaltstack
type Sigcontext C.struct_sigcontext type Sigcontext C.struct_sigcontext
...@@ -118,4 +118,4 @@ type Timespec C.struct_timespec ...@@ -118,4 +118,4 @@ type Timespec C.struct_timespec
type Timeval C.struct_timeval type Timeval C.struct_timeval
type Itimerval C.struct_itimerval type Itimerval C.struct_itimerval
type Kevent C.struct_kevent type KeventT C.struct_kevent
...@@ -81,7 +81,7 @@ enum { ...@@ -81,7 +81,7 @@ enum {
EVFILT_WRITE = -0x2, EVFILT_WRITE = -0x2,
}; };
typedef struct Tfork Tfork; typedef struct TforkT TforkT;
typedef struct SigaltstackT SigaltstackT; typedef struct SigaltstackT SigaltstackT;
typedef struct Sigcontext Sigcontext; typedef struct Sigcontext Sigcontext;
typedef struct Siginfo Siginfo; typedef struct Siginfo Siginfo;
...@@ -93,7 +93,7 @@ typedef struct KeventT KeventT; ...@@ -93,7 +93,7 @@ typedef struct KeventT KeventT;
#pragma pack on #pragma pack on
struct Tfork { struct TforkT {
byte *tf_tcb; byte *tf_tcb;
int32 *tf_tid; int32 *tf_tid;
byte *tf_stack; byte *tf_stack;
......
...@@ -81,7 +81,7 @@ enum { ...@@ -81,7 +81,7 @@ enum {
EVFILT_WRITE = -0x2, EVFILT_WRITE = -0x2,
}; };
typedef struct Tfork Tfork; typedef struct TforkT TforkT;
typedef struct SigaltstackT SigaltstackT; typedef struct SigaltstackT SigaltstackT;
typedef struct Sigcontext Sigcontext; typedef struct Sigcontext Sigcontext;
typedef struct Siginfo Siginfo; typedef struct Siginfo Siginfo;
...@@ -93,7 +93,7 @@ typedef struct KeventT KeventT; ...@@ -93,7 +93,7 @@ typedef struct KeventT KeventT;
#pragma pack on #pragma pack on
struct Tfork { struct TforkT {
byte *tf_tcb; byte *tf_tcb;
int32 *tf_tid; int32 *tf_tid;
byte *tf_stack; byte *tf_stack;
......
...@@ -26,7 +26,7 @@ extern SigTab runtime·sigtab[]; ...@@ -26,7 +26,7 @@ extern SigTab runtime·sigtab[];
static Sigset sigset_none; static Sigset sigset_none;
static Sigset sigset_all = ~(Sigset)0; static Sigset sigset_all = ~(Sigset)0;
extern int32 runtime·tfork(void *param, uintptr psize, M *mp, G *gp, void (*fn)(void)); extern int32 runtime·tfork(TforkT *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·thrsleep(void *ident, int32 clock_id, void *tsp, void *lock, const int32 *abort);
extern int32 runtime·thrwakeup(void *ident, int32 n); extern int32 runtime·thrwakeup(void *ident, int32 n);
...@@ -130,7 +130,7 @@ runtime·semawakeup(M *mp) ...@@ -130,7 +130,7 @@ runtime·semawakeup(M *mp)
void void
runtime·newosproc(M *mp, void *stk) runtime·newosproc(M *mp, void *stk)
{ {
Tfork param; TforkT param;
Sigset oset; Sigset oset;
int32 ret; int32 ret;
...@@ -147,7 +147,7 @@ runtime·newosproc(M *mp, void *stk) ...@@ -147,7 +147,7 @@ runtime·newosproc(M *mp, void *stk)
param.tf_stack = stk; param.tf_stack = stk;
oset = runtime·sigprocmask(SIG_SETMASK, sigset_all); oset = runtime·sigprocmask(SIG_SETMASK, sigset_all);
ret = runtime·tfork((byte*)&param, sizeof(param), mp, mp->g0, runtime·mstart); ret = runtime·tfork(&param, sizeof(param), mp, mp->g0, runtime·mstart);
runtime·sigprocmask(SIG_SETMASK, oset); runtime·sigprocmask(SIG_SETMASK, oset);
if(ret < 0) { if(ret < 0) {
......
...@@ -15,7 +15,7 @@ func raise(sig int32) ...@@ -15,7 +15,7 @@ func raise(sig int32)
func kqueue() int32 func kqueue() int32
func kevent(fd int32, ev1 unsafe.Pointer, nev1 int32, ev2 unsafe.Pointer, nev2 int32, ts unsafe.Pointer) int32 func kevent(fd int32, ev1 unsafe.Pointer, nev1 int32, ev2 unsafe.Pointer, nev2 int32, ts unsafe.Pointer) int32
func closeonexec(fd int32) func closeonexec(fd int32)
func tfork(param unsafe.Pointer, psize uintptr, mm, gg, fn unsafe.Pointer) int32 func tfork(param *tforkt, psize uintptr, mm, gg, fn unsafe.Pointer) int32
func thrsleep(ident unsafe.Pointer, clock_id int32, tsp, lock, abort 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 func thrwakeup(ident unsafe.Pointer, n int32) int32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment