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,323
Issues
4,323
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
385
Merge Requests
385
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
59977b6c
Commit
59977b6c
authored
Mar 01, 2011
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GHC.Prim.threadStatus# now returns the cap number, and the value of TSO_LOCKED
parent
3da49121
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
compiler/prelude/primops.txt.pp
compiler/prelude/primops.txt.pp
+1
-1
includes/mkDerivedConstants.c
includes/mkDerivedConstants.c
+1
-0
rts/PrimOps.cmm
rts/PrimOps.cmm
+11
-2
No files found.
compiler/prelude/primops.txt.pp
View file @
59977b6c
...
...
@@ -1449,7 +1449,7 @@ primop NoDuplicateOp "noDuplicate#" GenPrimOp
has_side_effects = True
primop ThreadStatusOp "threadStatus#" GenPrimOp
ThreadId# -> State# RealWorld -> (# State# RealWorld, Int# #)
ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#
, Int#, Int#
#)
with
out_of_line = True
has_side_effects = True
...
...
includes/mkDerivedConstants.c
View file @
59977b6c
...
...
@@ -234,6 +234,7 @@ main(int argc, char *argv[])
field_offset
(
Capability
,
r
);
field_offset
(
Capability
,
lock
);
struct_field
(
Capability
,
no
);
struct_field
(
Capability
,
mut_lists
);
struct_field
(
Capability
,
context_switch
);
struct_field
(
Capability
,
sparks
);
...
...
rts/PrimOps.cmm
View file @
59977b6c
...
...
@@ -631,7 +631,7 @@ stg_threadStatuszh
W_
tso
;
W_
why_blocked
;
W_
what_next
;
W_
ret
;
W_
ret
,
cap
,
locked
;
tso
=
R1
;
...
...
@@ -651,7 +651,16 @@ stg_threadStatuszh
ret
=
why_blocked
;
}
}
RET_N
(
ret
);
cap
=
TO_W_
(
Capability_no
(
StgTSO_cap
(
tso
)));
if
((
TO_W_
(
StgTSO_flags
(
tso
))
&
TSO_LOCKED
)
!=
0
)
{
locked
=
1
;
}
else
{
locked
=
0
;
}
RET_NNN
(
ret
,
cap
,
locked
);
}
/* -----------------------------------------------------------------------------
...
...
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