summaryrefslogtreecommitdiff
path: root/test/mutex.c
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-20 00:00:27 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-06 12:40:45 +0000
commitcdcaf6ed8a1d18bdedb72fb665263c0dbff0ac8e (patch)
treeab01862ee3a4114e43ec974fbbbdd615e1e61d63 /test/mutex.c
parent7c673390aecdd35da01ddf446a23667d95dccef1 (diff)
downloadchrome-ec-cdcaf6ed8a1d18bdedb72fb665263c0dbff0ac8e.tar.gz
Add interrupt support for emulator
This provides us a way to inject interrupts during a test. If a test has interrupt_generator() defined, it will run in a separate thread. The generator can then trigger interrupts when it decides to. The current running task is suspended while emulator is executing ISR. Also fixes a bug that tasks run without scheduler notifying them during emulator start-up. BUG=chrome-os-partner:19235 TEST=Repeatedly run all tests. BRANCH=None Change-Id: I0f921c47c0f848a9626da6272d9040e2b7c5ac86 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/55671
Diffstat (limited to 'test/mutex.c')
-rw-r--r--test/mutex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/mutex.c b/test/mutex.c
index 10cf300e22..96bc69feee 100644
--- a/test/mutex.c
+++ b/test/mutex.c
@@ -111,5 +111,6 @@ int mutex_main_task(void *unused)
void run_test(void)
{
+ wait_for_task_started();
task_wake(TASK_ID_MTX1);
}