Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
9367b24f
Commit
9367b24f
authored
May 29, 2008
by
Simon Marlow
Browse files
hs_add_root: use use rts_lock()/rts_unlock() for a bit of extra safety
parent
eacbef6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/RtsStartup.c
View file @
9367b24f
...
...
@@ -330,7 +330,9 @@ hs_add_root(void (*init_root)(void))
{
bdescr
*
bd
;
nat
init_sp
;
Capability
*
cap
=
&
MainCapability
;
Capability
*
cap
;
cap
=
rts_lock
();
if
(
hs_init_count
<=
0
)
{
barf
(
"hs_add_root() must be called after hs_init()"
);
...
...
@@ -357,6 +359,8 @@ hs_add_root(void (*init_root)(void))
// ToDo: make this work in the presence of multiple hs_add_root()s.
initProfiling2
();
rts_unlock
(
cap
);
// ditto.
#if defined(THREADED_RTS)
ioManagerStart
();
...
...
Write
Preview
Supports
Markdown
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