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
376
Merge Requests
376
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
dce2394f
Commit
dce2394f
authored
Jun 24, 2009
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propagate the result of atomically properly (fixes
#3049
)
parent
babf070d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
includes/Closures.h
includes/Closures.h
+1
-0
includes/mkDerivedConstants.c
includes/mkDerivedConstants.c
+1
-0
rts/PrimOps.cmm
rts/PrimOps.cmm
+8
-4
No files found.
includes/Closures.h
View file @
dce2394f
...
...
@@ -398,6 +398,7 @@ typedef struct {
StgHeader
header
;
StgClosure
*
code
;
StgTVarWatchQueue
*
next_invariant_to_check
;
StgClosure
*
result
;
}
StgAtomicallyFrame
;
typedef
struct
{
...
...
includes/mkDerivedConstants.c
View file @
dce2394f
...
...
@@ -335,6 +335,7 @@ main(int argc, char *argv[])
closure_size
(
StgAtomicallyFrame
);
closure_field
(
StgAtomicallyFrame
,
code
);
closure_field
(
StgAtomicallyFrame
,
next_invariant_to_check
);
closure_field
(
StgAtomicallyFrame
,
result
);
closure_field
(
StgInvariantCheckQueue
,
invariant
);
closure_field
(
StgInvariantCheckQueue
,
my_execution
);
...
...
rts/PrimOps.cmm
View file @
dce2394f
...
...
@@ -678,18 +678,20 @@ INFO_TABLE_RET(stg_atomically_frame, ATOMICALLY_FRAME,
#if
defined
(
PROFILING
)
W_
unused1
,
W_
unused2
,
#endif
P_
unused3
,
P_
unused4
)
P_
code
,
P_
next_invariant_to_check
,
P_
result
)
{
W_
frame
,
trec
,
valid
,
next_invariant
,
q
,
outer
;
frame
=
Sp
;
trec
=
StgTSO_trec
(
CurrentTSO
);
frame
=
Sp
;
trec
=
StgTSO_trec
(
CurrentTSO
);
result
=
R1
;
(
"
ptr
"
outer
)
=
foreign
"
C
"
stmGetEnclosingTRec
(
trec
"
ptr
"
)
[];
if
(
outer
==
NO_TREC
)
{
/* First time back at the atomically frame -- pick up invariants */
(
"
ptr
"
q
)
=
foreign
"
C
"
stmGetInvariantsToCheck
(
MyCapability
()
"
ptr
"
,
trec
"
ptr
"
)
[];
StgAtomicallyFrame_next_invariant_to_check
(
frame
)
=
q
;
StgAtomicallyFrame_result
(
frame
)
=
result
;
}
else
{
/* Second/subsequent time back at the atomically frame -- abort the
...
...
@@ -723,6 +725,7 @@ INFO_TABLE_RET(stg_atomically_frame, ATOMICALLY_FRAME,
if
(
valid
!=
0
)
{
/* Transaction was valid: commit succeeded */
StgTSO_trec
(
CurrentTSO
)
=
NO_TREC
;
R1
=
StgAtomicallyFrame_result
(
frame
);
Sp
=
Sp
+
SIZEOF_StgAtomicallyFrame
;
jump
%ENTRY_CODE
(
Sp
(
SP_OFF
));
}
else
{
...
...
@@ -740,7 +743,7 @@ INFO_TABLE_RET(stg_atomically_waiting_frame, ATOMICALLY_FRAME,
#if
defined
(
PROFILING
)
W_
unused1
,
W_
unused2
,
#endif
P_
unused3
,
P_
unused4
)
P_
code
,
P_
next_invariant_to_check
,
P_
result
)
{
W_
frame
,
trec
,
valid
;
...
...
@@ -825,6 +828,7 @@ atomicallyzh_fast
SET_HDR
(
frame
,
stg_atomically_frame_info
,
W_
[
CCCS
]);
StgAtomicallyFrame_code
(
frame
)
=
R1
;
StgAtomicallyFrame_result
(
frame
)
=
NO_TREC
;
StgAtomicallyFrame_next_invariant_to_check
(
frame
)
=
END_INVARIANT_CHECK_QUEUE
;
/* Start the memory transcation */
...
...
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