diff options
-rw-r--r-- | rts/Schedule.h | 2 | ||||
-rw-r--r-- | rts/Trace.h | 2 | ||||
-rw-r--r-- | rts/include/Stg.h | 2 | ||||
-rw-r--r-- | rts/sm/NonMovingMark.h | 4 |
4 files changed, 7 insertions, 3 deletions
diff --git a/rts/Schedule.h b/rts/Schedule.h index 415d2a3291..e4f17af3cf 100644 --- a/rts/Schedule.h +++ b/rts/Schedule.h @@ -131,7 +131,7 @@ setRecentActivity(enum RecentActivity new_value) INLINE_HEADER enum RecentActivity getRecentActivity(void) { - return RELAXED_LOAD_ALWAYS(&recent_activity); + return (enum RecentActivity) RELAXED_LOAD_ALWAYS(&recent_activity); } extern bool heap_overflow; diff --git a/rts/Trace.h b/rts/Trace.h index 6e08d0d2fd..6b1d797a30 100644 --- a/rts/Trace.h +++ b/rts/Trace.h @@ -33,7 +33,9 @@ void tracingAddCapapilities (uint32_t from, uint32_t to); #endif /* TRACING */ typedef StgWord32 CapsetID; +#if !defined(__cplusplus) typedef StgWord16 CapsetType; +#endif enum CapsetType { CapsetTypeCustom = CAPSET_TYPE_CUSTOM, CapsetTypeOsProcess = CAPSET_TYPE_OSPROCESS, CapsetTypeClockdomain = CAPSET_TYPE_CLOCKDOMAIN }; diff --git a/rts/include/Stg.h b/rts/include/Stg.h index bd15e73cda..c366fa0362 100644 --- a/rts/include/Stg.h +++ b/rts/include/Stg.h @@ -242,6 +242,8 @@ #define STG_PRINTF_ATTR(fmt_arg, rest) GNUC3_ATTRIBUTE(format(printf, fmt_arg, rest)) #endif +#define STG_RESTRICT __restrict__ + #define STG_NORETURN GNU_ATTRIBUTE(__noreturn__) #define STG_MALLOC GNUC3_ATTRIBUTE(__malloc__) diff --git a/rts/sm/NonMovingMark.h b/rts/sm/NonMovingMark.h index 4b5c61cb38..04859215b1 100644 --- a/rts/sm/NonMovingMark.h +++ b/rts/sm/NonMovingMark.h @@ -63,7 +63,7 @@ INLINE_HEADER enum EntryType nonmovingMarkQueueEntryType(MarkQueueEnt *ent) { uintptr_t tag = (uintptr_t) ent->null_entry.p & TAG_MASK; ASSERT(tag <= MARK_ARRAY); - return tag; + return (enum EntryType) tag; } typedef struct { @@ -155,7 +155,7 @@ void markQueueAddRoot(MarkQueue* q, StgClosure** root); void initMarkQueue(MarkQueue *queue); void freeMarkQueue(MarkQueue *queue); -void nonmovingMark(struct MarkQueue_ *restrict queue); +void nonmovingMark(struct MarkQueue_ *STG_RESTRICT queue); bool nonmovingTidyWeaks(struct MarkQueue_ *queue); void nonmovingTidyThreads(void); |