diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2019-09-27 15:49:03 +0000 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-24 21:00:36 -0400 |
| commit | 65219810a41f1c903838185a766baeba8954cc88 (patch) | |
| tree | e8978410b5a6026707f6087cd51028f5c910a0e6 /rts/Threads.c | |
| parent | f6b4b492d9c112c30ddc0bda2338b143b56faf4c (diff) | |
| download | haskell-65219810a41f1c903838185a766baeba8954cc88.tar.gz | |
rts: Add assertions for task ownership of capabilities
Diffstat (limited to 'rts/Threads.c')
| -rw-r--r-- | rts/Threads.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Threads.c b/rts/Threads.c index 54c703963e..2e1da17d6f 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -355,9 +355,11 @@ unblock: migrateThread ------------------------------------------------------------------------- */ +// Precondition: The caller must own the `from` capability. void migrateThread (Capability *from, StgTSO *tso, Capability *to) { + ASSERT_FULL_CAPABILITY_INVARIANTS(from, getTask()); traceEventMigrateThread (from, tso, to->no); // ThreadMigrating tells the target cap that it needs to be added to // the run queue when it receives the MSG_TRY_WAKEUP. |
