runtime: add timespec definition for freebsd

R=golang-dev, devon.odell
CC=golang-dev
https://golang.org/cl/5340058
This commit is contained in:
Joel Sing 2011-11-08 11:43:58 -05:00 committed by Russ Cox
parent cabe0e6ad3
commit 0e5cd9d3f6
3 changed files with 14 additions and 0 deletions

View file

@ -173,6 +173,12 @@ struct Ucontext {
byte pad_godefs_0[12]; byte pad_godefs_0[12];
}; };
typedef struct Timespec Timespec;
struct Timespec {
int32 tv_sec;
int32 tv_nsec;
};
typedef struct Timeval Timeval; typedef struct Timeval Timeval;
struct Timeval { struct Timeval {
int32 tv_sec; int32 tv_sec;

View file

@ -184,6 +184,12 @@ struct Ucontext {
byte pad_godefs_0[12]; byte pad_godefs_0[12];
}; };
typedef struct Timespec Timespec;
struct Timespec {
int64 tv_sec;
int64 tv_nsec;
};
typedef struct Timeval Timeval; typedef struct Timeval Timeval;
struct Timeval { struct Timeval {
int64 tv_sec; int64 tv_sec;

View file

@ -104,5 +104,7 @@ typedef siginfo_t $Siginfo;
typedef mcontext_t $Mcontext; typedef mcontext_t $Mcontext;
typedef ucontext_t $Ucontext; typedef ucontext_t $Ucontext;
typedef struct timespec $Timespec;
typedef struct timeval $Timeval; typedef struct timeval $Timeval;
typedef struct itimerval $Itimerval; typedef struct itimerval $Itimerval;