aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2018-08-10 14:48:42 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2018-08-10 14:48:42 +0100
commitac7564f4d649945cd492723c5cec4bd7678e5137 (patch)
treee7b8b06763875ce3af1a0554971597a88cba7b5c
parent7a7c34936f0fd034905478f5731e4a7e8289a95e (diff)
downloadkernel-tla-ac7564f4d649945cd492723c5cec4bd7678e5137.tar.gz
ctxsw: Remove the sleep() macro
This is rather confusing, better use "await Running(self)" explicitly. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--ctxsw.tla9
1 files changed, 2 insertions, 7 deletions
diff --git a/ctxsw.tla b/ctxsw.tla
index 92f46d7..17384dc 100644
--- a/ctxsw.tla
+++ b/ctxsw.tla
@@ -70,11 +70,6 @@ define {
Perms == Permutations(PROCS) \cup Permutations(TASKS) \cup Permutations(MMS)
}
-macro sleep(t) {
- \* wait for the thread to be scheduled on a CPU
- await task[t].cpu # "none";
-}
-
macro local_irq_disable() {
interrupts[task[self].cpu] := "off";
}
@@ -153,7 +148,7 @@ exm4: task[self].mm := "null";
procedure finish_task_switch()
{
fts1: \* wait for the current thread to be rescheduled
- sleep(self);
+ await Running(self);
if (prev_mm[task[self].cpu] # "null")
call mmdrop(prev_mm[task[self].cpu]);
@@ -255,7 +250,7 @@ process (idle \in PROCS)
{
idle_start:
while (TRUE)
- sleep(self);
+ await Running(self);
}
} *)
------------------------------------------------------------------------------