Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c60d0485
Commit
c60d0485
authored
Apr 08, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: fix build (panic) for FreeBSD
R=adg CC=golang-dev
https://golang.org/cl/867046
parent
5963dbac
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
9 deletions
+101
-9
src/pkg/runtime/freebsd/386/defs.h
src/pkg/runtime/freebsd/386/defs.h
+46
-4
src/pkg/runtime/freebsd/386/signal.c
src/pkg/runtime/freebsd/386/signal.c
+2
-0
src/pkg/runtime/freebsd/amd64/defs.h
src/pkg/runtime/freebsd/amd64/defs.h
+44
-0
src/pkg/runtime/freebsd/amd64/signal.c
src/pkg/runtime/freebsd/amd64/signal.c
+3
-1
src/pkg/runtime/freebsd/os.h
src/pkg/runtime/freebsd/os.h
+4
-0
src/pkg/runtime/freebsd/thread.c
src/pkg/runtime/freebsd/thread.c
+2
-2
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.c
+0
-2
No files found.
src/pkg/runtime/freebsd/386/defs.h
View file @
c60d0485
// godefs
freebsd/
defs.c
// godefs defs.c
// MACHINE GENERATED - DO NOT EDIT.
...
...
@@ -16,6 +16,50 @@ enum {
UMTX_OP_WAIT
=
0x2
,
UMTX_OP_WAKE
=
0x3
,
EINTR
=
0x4
,
SIGHUP
=
0x1
,
SIGINT
=
0x2
,
SIGQUIT
=
0x3
,
SIGILL
=
0x4
,
SIGTRAP
=
0x5
,
SIGABRT
=
0x6
,
SIGEMT
=
0x7
,
SIGFPE
=
0x8
,
SIGKILL
=
0x9
,
SIGBUS
=
0xa
,
SIGSEGV
=
0xb
,
SIGSYS
=
0xc
,
SIGPIPE
=
0xd
,
SIGALRM
=
0xe
,
SIGTERM
=
0xf
,
SIGURG
=
0x10
,
SIGSTOP
=
0x11
,
SIGTSTP
=
0x12
,
SIGCONT
=
0x13
,
SIGCHLD
=
0x14
,
SIGTTIN
=
0x15
,
SIGTTOU
=
0x16
,
SIGIO
=
0x17
,
SIGXCPU
=
0x18
,
SIGXFSZ
=
0x19
,
SIGVTALRM
=
0x1a
,
SIGPROF
=
0x1b
,
SIGWINCH
=
0x1c
,
SIGINFO
=
0x1d
,
SIGUSR1
=
0x1e
,
SIGUSR2
=
0x1f
,
FPE_INTDIV
=
0x2
,
FPE_INTOVF
=
0x1
,
FPE_FLTDIV
=
0x3
,
FPE_FLTOVF
=
0x4
,
FPE_FLTUND
=
0x5
,
FPE_FLTRES
=
0x6
,
FPE_FLTINV
=
0x7
,
FPE_FLTSUB
=
0x8
,
BUS_ADRALN
=
0x1
,
BUS_ADRERR
=
0x2
,
BUS_OBJERR
=
0x3
,
SEGV_MAPERR
=
0x1
,
SEGV_ACCERR
=
0x2
,
};
// Types
...
...
@@ -109,9 +153,7 @@ struct Mcontext {
int32
mc_ownedfp
;
int32
mc_spare1
[
1
];
int32
mc_fpstate
[
128
];
int32
mc_fsbase
;
int32
mc_gsbase
;
int32
mc_spare2
[
6
];
int32
mc_spare2
[
8
];
};
typedef
struct
Ucontext
Ucontext
;
...
...
src/pkg/runtime/freebsd/386/signal.c
View file @
c60d0485
...
...
@@ -49,6 +49,8 @@ sighandler(int32 sig, Siginfo* info, void* context)
{
Ucontext
*
uc
;
Mcontext
*
r
;
G
*
gp
;
uintptr
*
sp
;
uc
=
context
;
r
=
&
uc
->
uc_mcontext
;
...
...
src/pkg/runtime/freebsd/amd64/defs.h
View file @
c60d0485
...
...
@@ -16,6 +16,50 @@ enum {
UMTX_OP_WAIT
=
0x2
,
UMTX_OP_WAKE
=
0x3
,
EINTR
=
0x4
,
SIGHUP
=
0x1
,
SIGINT
=
0x2
,
SIGQUIT
=
0x3
,
SIGILL
=
0x4
,
SIGTRAP
=
0x5
,
SIGABRT
=
0x6
,
SIGEMT
=
0x7
,
SIGFPE
=
0x8
,
SIGKILL
=
0x9
,
SIGBUS
=
0xa
,
SIGSEGV
=
0xb
,
SIGSYS
=
0xc
,
SIGPIPE
=
0xd
,
SIGALRM
=
0xe
,
SIGTERM
=
0xf
,
SIGURG
=
0x10
,
SIGSTOP
=
0x11
,
SIGTSTP
=
0x12
,
SIGCONT
=
0x13
,
SIGCHLD
=
0x14
,
SIGTTIN
=
0x15
,
SIGTTOU
=
0x16
,
SIGIO
=
0x17
,
SIGXCPU
=
0x18
,
SIGXFSZ
=
0x19
,
SIGVTALRM
=
0x1a
,
SIGPROF
=
0x1b
,
SIGWINCH
=
0x1c
,
SIGINFO
=
0x1d
,
SIGUSR1
=
0x1e
,
SIGUSR2
=
0x1f
,
FPE_INTDIV
=
0x2
,
FPE_INTOVF
=
0x1
,
FPE_FLTDIV
=
0x3
,
FPE_FLTOVF
=
0x4
,
FPE_FLTUND
=
0x5
,
FPE_FLTRES
=
0x6
,
FPE_FLTINV
=
0x7
,
FPE_FLTSUB
=
0x8
,
BUS_ADRALN
=
0x1
,
BUS_ADRERR
=
0x2
,
BUS_OBJERR
=
0x3
,
SEGV_MAPERR
=
0x1
,
SEGV_ACCERR
=
0x2
,
};
// Types
...
...
src/pkg/runtime/freebsd/amd64/signal.c
View file @
c60d0485
...
...
@@ -57,6 +57,8 @@ sighandler(int32 sig, Siginfo* info, void* context)
{
Ucontext
*
uc
;
Mcontext
*
r
;
G
*
gp
;
uintptr
*
sp
;
uc
=
context
;
r
=
&
uc
->
uc_mcontext
;
...
...
@@ -98,7 +100,7 @@ sighandler(int32 sig, Siginfo* info, void* context)
if
(
gotraceback
()){
traceback
((
void
*
)
r
->
mc_rip
,
(
void
*
)
r
->
mc_rsp
,
0
,
(
void
*
)
r
->
mc_r15
);
tracebackothers
((
void
*
)
r
->
mc_r15
);
dumpregs
(
mc
);
dumpregs
(
r
);
}
breakpoint
();
...
...
src/pkg/runtime/freebsd/os.h
View file @
c60d0485
int32
thr_new
(
ThrParam
*
,
int32
);
void
sigpanic
(
void
);
void
sigaltstack
(
Sigaltstack
*
,
Sigaltstack
*
);
struct
sigaction
;
void
sigaction
(
int32
,
struct
sigaction
*
,
struct
sigaction
*
);
src/pkg/runtime/freebsd/thread.c
View file @
c60d0485
...
...
@@ -3,10 +3,10 @@
#include "runtime.h"
#include "defs.h"
#include "signals.h"
#include "os.h"
extern
SigTab
sigtab
[];
extern
int32
sys_umtx_op
(
uint32
*
,
int32
,
uint32
,
void
*
,
void
*
);
// FreeBSD's umtx_op syscall is effectively the same as Linux's futex, and
// thus the code is largely similar. See linux/thread.c for comments.
...
...
@@ -102,7 +102,7 @@ unlock(Lock *l)
}
void
destroylock
(
Lock
*
l
)
destroylock
(
Lock
*
)
{
}
...
...
src/pkg/runtime/runtime.c
View file @
c60d0485
...
...
@@ -22,8 +22,6 @@ gotraceback(void)
void
panic
(
int32
unused
)
{
uint8
*
sp
;
fd
=
2
;
if
(
panicking
)
{
printf
(
"double panic
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment