Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
5f7079b9
Commit
5f7079b9
authored
Feb 06, 2009
by
Simon Marlow
Browse files
add a single-threaded version of cas()
parent
aee6d689
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/SMP.h
View file @
5f7079b9
...
...
@@ -218,6 +218,17 @@ xchg(StgPtr p, StgWord w)
return
old
;
}
STATIC_INLINE
StgWord
cas
(
StgVolatilePtr
p
,
StgWord
o
,
StgWord
n
)
{
StgWord
result
;
result
=
*
p
;
if
(
result
==
o
)
{
*
p
=
n
;
}
return
result
;
}
#endif
/* !THREADED_RTS */
#endif
/* SMP_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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