Commit fe3740bd authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Make `#include "Rts.h"` C++-compatible again (re #8676)

Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 1ad599ea
......@@ -68,6 +68,6 @@ extern Capability MainCapability;
// Change the number of capabilities (only supports increasing the
// current value at the moment).
//
extern void setNumCapabilities (nat new);
extern void setNumCapabilities (nat new_);
#endif /* RTS_THREADS_H */
......@@ -248,17 +248,17 @@ dbl_link_insert_after(bdescr *bd, bdescr *after)
}
INLINE_HEADER void
dbl_link_replace(bdescr *new, bdescr *old, bdescr **list)
dbl_link_replace(bdescr *new_, bdescr *old, bdescr **list)
{
new->link = old->link;
new->u.back = old->u.back;
new_->link = old->link;
new_->u.back = old->u.back;
if (old->link) {
old->link->u.back = new;
old->link->u.back = new_;
}
if (old->u.back) {
old->u.back->link = new;
old->u.back->link = new_;
} else {
*list = new;
*list = new_;
}
}
......
......@@ -245,12 +245,12 @@ TAG_CLOSURE(StgWord tag,StgClosure * p)
INLINE_HEADER rtsBool LOOKS_LIKE_INFO_PTR_NOT_NULL (StgWord p)
{
StgInfoTable *info = INFO_PTR_TO_STRUCT((StgInfoTable *)p);
return info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES;
return (info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES) ? rtsTrue : rtsFalse;
}
INLINE_HEADER rtsBool LOOKS_LIKE_INFO_PTR (StgWord p)
{
return p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p));
return (p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p))) ? rtsTrue : rtsFalse;
}
INLINE_HEADER rtsBool LOOKS_LIKE_CLOSURE_PTR (void *p)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment