Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
obsidiansystems
GHC
Commits
00912bda
Commit
00912bda
authored
Mar 13, 2004
by
sof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2004-03-13 00:56:45 by sof]
tidy up conditional forkProcess() support
parent
13c52eb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
ghc/rts/Schedule.c
ghc/rts/Schedule.c
+22
-11
No files found.
ghc/rts/Schedule.c
View file @
00912bda
/* ---------------------------------------------------------------------------
* $Id: Schedule.c,v 1.19
3 2004/03/01 14:18:35 simonmar
Exp $
* $Id: Schedule.c,v 1.19
4 2004/03/13 00:56:45 sof
Exp $
*
* (c) The GHC Team, 1998-2003
*
...
...
@@ -1380,13 +1380,22 @@ isThreadBound(StgTSO* tso USED_IN_THREADED_RTS)
* Singleton fork(). Do not copy any running threads.
* ------------------------------------------------------------------------- */
#ifndef mingw32_TARGET_OS
#define FORKPROCESS_PRIMOP_SUPPORTED
#endif
#ifdef FORKPROCESS_PRIMOP_SUPPORTED
static
void
deleteThreadImmediately
(
StgTSO
*
tso
);
#endif
StgInt
forkProcess
(
HsStablePtr
*
entry
)
forkProcess
(
HsStablePtr
*
entry
#ifndef FORKPROCESS_PRIMOP_SUPPORTED
STG_UNUSED
#endif
)
{
#if
ndef mingw32_TARGET_OS
#if
def FORKPROCESS_PRIMOP_SUPPORTED
pid_t
pid
;
StgTSO
*
t
,
*
next
;
StgMainThread
*
m
;
...
...
@@ -1420,17 +1429,17 @@ forkProcess(HsStablePtr *entry)
// wipe the main thread list
while
((
m
=
main_threads
)
!=
NULL
)
{
main_threads
=
m
->
link
;
#ifdef THREADED_RTS
#
ifdef THREADED_RTS
closeCondition
(
&
m
->
bound_thread_cond
);
#endif
#
endif
stgFree
(
m
);
}
#ifdef RTS_SUPPORTS_THREADS
#
ifdef RTS_SUPPORTS_THREADS
resetTaskManagerAfterFork
();
// tell startTask() and friends that
startingWorkerThread
=
rtsFalse
;
// we have no worker threads any more
resetWorkerWakeupPipeAfterFork
();
#endif
#
endif
rc
=
rts_evalStableIO
(
entry
,
NULL
);
// run the action
rts_checkSchedStatus
(
"forkProcess"
,
rc
);
...
...
@@ -1440,10 +1449,10 @@ forkProcess(HsStablePtr *entry)
hs_exit
();
// clean up and exit
stg_exit
(
0
);
}
#else
/*
mingw32
*/
barf
(
"forkProcess#: primop not
implemented for mingw32
, sorry!
\n
"
);
#else
/*
!FORKPROCESS_PRIMOP_SUPPORTED
*/
barf
(
"forkProcess#: primop not
supported
, sorry!
\n
"
);
return
-
1
;
#endif
/* mingw32 */
#endif
}
/* ---------------------------------------------------------------------------
...
...
@@ -2931,6 +2940,7 @@ deleteThread(StgTSO *tso)
raiseAsync
(
tso
,
NULL
);
}
#ifdef FORKPROCESS_PRIMOP_SUPPORTED
static
void
deleteThreadImmediately
(
StgTSO
*
tso
)
{
// for forkProcess only:
...
...
@@ -2947,6 +2957,7 @@ deleteThreadImmediately(StgTSO *tso)
tso
->
what_next
=
ThreadKilled
;
}
#endif
void
raiseAsyncWithLock
(
StgTSO
*
tso
,
StgClosure
*
exception
)
...
...
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