Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
0be1a589
Commit
0be1a589
authored
Nov 05, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: provide initcontext and fixcontext for NetBSD
From-SVN: r193173
parent
ae0b23e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletions
+23
-1
libgo/runtime/proc.c
+23
-1
No files found.
libgo/runtime/proc.c
View file @
0be1a589
...
...
@@ -82,7 +82,7 @@ fixcontext(ucontext_t *c __attribute__ ((unused)))
{
}
#
else
#else
# if defined(__x86_64__) && defined(__sun__)
...
...
@@ -110,6 +110,28 @@ fixcontext(ucontext_t* c)
c
->
uc_mcontext
.
gregs
[
REG_FSBASE
]
=
fs
;
}
# elif defined(__NetBSD__)
// NetBSD has a bug: setcontext clobbers tlsbase, we need to save
// and restore it ourselves.
static
__thread
__greg_t
tlsbase
;
static
inline
void
initcontext
(
void
)
{
ucontext_t
c
;
getcontext
(
&
c
);
tlsbase
=
c
.
uc_mcontext
.
_mc_tlsbase
;
}
static
inline
void
fixcontext
(
ucontext_t
*
c
)
{
c
->
uc_mcontext
.
_mc_tlsbase
=
tlsbase
;
}
# else
# error unknown case for SETCONTEXT_CLOBBERS_TLS
...
...
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