Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
jberryman
GHC
Commits
b9fbc901
Commit
b9fbc901
authored
Sep 26, 2003
by
panne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2003-09-26 13:32:14 by panne]
Warning police
parent
e8ffdfeb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
ghc/rts/OSThreads.c
ghc/rts/OSThreads.c
+1
-1
ghc/rts/Schedule.c
ghc/rts/Schedule.c
+20
-3
No files found.
ghc/rts/OSThreads.c
View file @
b9fbc901
...
...
@@ -259,7 +259,7 @@ forkOS_createThread ( HsStablePtr entry )
#else
/* !defined(RTS_SUPPORTS_THREADS) */
int
forkOS_createThread
(
HsStablePtr
entry
)
forkOS_createThread
(
HsStablePtr
entry
STG_UNUSED
)
{
return
-
1
;
}
...
...
ghc/rts/Schedule.c
View file @
b9fbc901
/* ---------------------------------------------------------------------------
* $Id: Schedule.c,v 1.17
4
2003/09/2
1 22:20:56 wolfgang
Exp $
* $Id: Schedule.c,v 1.17
5
2003/09/2
6 13:32:14 panne
Exp $
*
* (c) The GHC Team, 1998-2000
*
...
...
@@ -130,6 +130,18 @@
#include <errno.h>
#endif
#ifdef THREADED_RTS
#define USED_IN_THREADED_RTS
#else
#define USED_IN_THREADED_RTS STG_UNUSED
#endif
#ifdef RTS_SUPPORTS_THREADS
#define USED_WHEN_RTS_SUPPORTS_THREADS
#else
#define USED_WHEN_RTS_SUPPORTS_THREADS STG_UNUSED
#endif
//@node Variables and Data structures, Prototypes, Includes, Main scheduling code
//@subsection Variables and Data structures
...
...
@@ -358,7 +370,8 @@ startSchedulerTask(void)
------------------------------------------------------------------------ */
//@cindex schedule
static
void
schedule
(
StgMainThread
*
mainThread
,
Capability
*
initialCapability
)
schedule
(
StgMainThread
*
mainThread
USED_WHEN_RTS_SUPPORTS_THREADS
,
Capability
*
initialCapability
)
{
StgTSO
*
t
;
Capability
*
cap
=
initialCapability
;
...
...
@@ -1592,7 +1605,7 @@ rtsSupportsBoundThreads(void)
* ------------------------------------------------------------------------- */
StgBool
isThreadBound
(
StgTSO
*
tso
)
isThreadBound
(
StgTSO
*
tso
USED_IN_THREADED_RTS
)
{
#ifdef THREADED_RTS
StgMainThread
*
m
;
...
...
@@ -1609,8 +1622,10 @@ isThreadBound(StgTSO* tso)
* Singleton fork(). Do not copy any running threads.
* ------------------------------------------------------------------------- */
#ifdef THREADED_RTS
static
void
deleteThreadImmediately
(
StgTSO
*
tso
);
#endif
StgInt
forkProcess
(
StgTSO
*
tso
)
...
...
@@ -3474,6 +3489,7 @@ deleteThread(StgTSO *tso)
raiseAsync
(
tso
,
NULL
);
}
#ifdef THREADED_RTS
static
void
deleteThreadImmediately
(
StgTSO
*
tso
)
{
// for forkProcess only:
...
...
@@ -3485,6 +3501,7 @@ deleteThreadImmediately(StgTSO *tso)
unblockThread
(
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