Commit b25ebcf6 authored by sof's avatar sof
Browse files

[project @ 2005-10-26 22:33:20 by sof]

ASSERT_TASK_ID(): THREADED_RTS-only assert
parent 9348149e
......@@ -78,6 +78,12 @@ struct Capability_ {
}; // typedef Capability, defined in RtsAPI.h
#if defined(THREADED_RTS)
#define ASSERT_TASK_ID(task) ASSERT(task->id == osThreadId())
#else
#define ASSERT_TASK_ID(task) /*empty*/
#endif
// These properties should be true when a Task is holding a Capability
#define ASSERT_CAPABILITY_INVARIANTS(cap,task) \
ASSERT(cap->running_task != NULL && cap->running_task == task); \
......@@ -85,8 +91,7 @@ struct Capability_ {
ASSERT(cap->run_queue_hd == END_TSO_QUEUE ? \
cap->run_queue_tl == END_TSO_QUEUE : 1); \
ASSERT(myTask() == task); \
ASSERT(task->id == osThreadId());
ASSERT_TASK_ID(task);
// Converts a *StgRegTable into a *Capability.
//
......
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