Skip to content

Commit 0a92d99

Browse files
committed
Change timing behavior of the app
To help CI, we want the first messages of the sequence to be predicatble. After the first burst, timing will mix messages up, which is good for the robustness of the app. public box threads.
1 parent 4042bd4 commit 0a92d99

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

source/client_a.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void box_async_runner(void)
6767
}
6868
}
6969

70-
Thread::wait(5000);
70+
Thread::wait(7000);
7171
}
7272
}
7373

@@ -84,6 +84,8 @@ static void box_sync_runner(void)
8484

8585
static void client_a_main(const void *)
8686
{
87+
Thread::wait(1000);
88+
8789
/* Create new threads. */
8890
/* Note: The stack must be at least 1kB since threads will use printf. */
8991
Thread sync(osPriorityNormal, 1024, NULL);

source/client_b.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ static uint32_t get_a_number()
4848

4949
static void client_b_main(const void *)
5050
{
51+
Thread::wait(2000);
52+
5153
/* The entire box code runs in its main thread. */
5254
while (1) {
5355
uvisor_rpc_result_t result;
@@ -72,6 +74,6 @@ static void client_b_main(const void *)
7274
number = secure_number_get_number();
7375
shared_pc.printf("client_b: Attempt to read : 0x%08X (granted)\r\n", (unsigned int) number);
7476

75-
Thread::wait(3000);
77+
Thread::wait(7000);
7678
}
7779
}

source/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void main_async_runner(void)
6868
}
6969
}
7070

71-
Thread::wait(13000);
71+
Thread::wait(7000);
7272
}
7373
}
7474

@@ -79,7 +79,7 @@ static void main_sync_runner(void)
7979
const uint32_t number = secure_number_get_number();
8080
shared_pc.printf("public : Attempt to read : 0x%08X (granted)\r\n", (unsigned int) number);
8181

82-
Thread::wait(11000);
82+
Thread::wait(7000);
8383
}
8484
}
8585

0 commit comments

Comments
 (0)