]> xenbits.xensource.com Git - osstest.git/commitdiff
Planner: ms-queuedaemon: Break out notify-to-think
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 2 Sep 2015 14:35:20 +0000 (15:35 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2015 10:29:19 +0000 (11:29 +0100)
This is going to want to do something more complicated shortly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Fix a whitespace error

ms-queuedaemon

index 3026a64f95f659854802cb1d0bbb81887ad5382a..1fe555de76bdcb84debd5db66eb348a709b9dc73 100755 (executable)
@@ -268,9 +268,8 @@ proc queuerun-perhaps-step {w} {
 
     set thinking_after [after [expr {$c(QueueThoughtsTimeout) * 1000}] \
                             queue-thoughts-timedout $w]
-    for-chan $thinking {
-        puts-chan $thinking "!OK think"
-    }
+
+    notify-to-think $w $thinking
 }
 
 proc report-plan {w} {
@@ -379,6 +378,12 @@ proc cmd/unwait {chan desc} {
     puts-chan $chan "OK unwait $res"
 }
 
+proc notify-to-think {w thinking} {
+    for-chan $thinking {
+       puts-chan $thinking "!OK think"
+    }
+}
+
 #---------- general stuff ----------
 
 proc banner {chan} {