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
4,309
Issues
4,309
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
383
Merge Requests
383
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
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
Glasgow Haskell Compiler
GHC
Commits
ab89dc19
Commit
ab89dc19
authored
Dec 04, 2007
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forkIO starts the new thread blocked if the parent is blocked (
#1048
)
parent
a5f2ab64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
rts/PrimOps.cmm
rts/PrimOps.cmm
+12
-0
No files found.
rts/PrimOps.cmm
View file @
ab89dc19
...
@@ -920,6 +920,12 @@ forkzh_fast
...
@@ -920,6 +920,12 @@ forkzh_fast
(
"
ptr
"
threadid
)
=
foreign
"
C
"
createIOThread
(
MyCapability
()
"
ptr
"
,
(
"
ptr
"
threadid
)
=
foreign
"
C
"
createIOThread
(
MyCapability
()
"
ptr
"
,
RtsFlags_GcFlags_initialStkSize
(
RtsFlags
),
RtsFlags_GcFlags_initialStkSize
(
RtsFlags
),
closure
"
ptr
"
)
[];
closure
"
ptr
"
)
[];
/* start blocked if the current thread is blocked */
StgTSO_flags
(
threadid
)
=
StgTSO_flags
(
threadid
)
|
(
StgTSO_flags
(
CurrentTSO
)
&
(
TSO_BLOCKEX
::
I32
|
TSO_INTERRUPTIBLE
::
I32
));
foreign
"
C
"
scheduleThread
(
MyCapability
()
"
ptr
"
,
threadid
"
ptr
"
)
[];
foreign
"
C
"
scheduleThread
(
MyCapability
()
"
ptr
"
,
threadid
"
ptr
"
)
[];
// switch at the earliest opportunity
// switch at the earliest opportunity
...
@@ -943,6 +949,12 @@ forkOnzh_fast
...
@@ -943,6 +949,12 @@ forkOnzh_fast
(
"
ptr
"
threadid
)
=
foreign
"
C
"
createIOThread
(
MyCapability
()
"
ptr
"
,
(
"
ptr
"
threadid
)
=
foreign
"
C
"
createIOThread
(
MyCapability
()
"
ptr
"
,
RtsFlags_GcFlags_initialStkSize
(
RtsFlags
),
RtsFlags_GcFlags_initialStkSize
(
RtsFlags
),
closure
"
ptr
"
)
[];
closure
"
ptr
"
)
[];
/* start blocked if the current thread is blocked */
StgTSO_flags
(
threadid
)
=
StgTSO_flags
(
threadid
)
|
(
StgTSO_flags
(
CurrentTSO
)
&
(
TSO_BLOCKEX
::
I32
|
TSO_INTERRUPTIBLE
::
I32
));
foreign
"
C
"
scheduleThreadOn
(
MyCapability
()
"
ptr
"
,
cpu
,
threadid
"
ptr
"
)
[];
foreign
"
C
"
scheduleThreadOn
(
MyCapability
()
"
ptr
"
,
cpu
,
threadid
"
ptr
"
)
[];
// switch at the earliest opportunity
// switch at the earliest opportunity
...
...
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