Skip to content

Commit

Permalink
Fixes and cleanup in passive server example
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Jan 11, 2024
1 parent a9bbc97 commit 2e0ef62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions example/imx8mm/passive_server/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

void init(void)
{
microkit_dbg_puts("client: client protection domain init function running\n");
microkit_dbg_puts("CLIENT|INFO: init function running\n");

/* message the server */
microkit_mr_set(0, 0);
(void) microkit_ppcall(SERVER_CH, microkit_msginfo_new(1, 1));
}

void notified(microkit_channel ch)
{
microkit_dbg_puts("client: recieved a notification on an unexpected channel\n");
microkit_dbg_puts("CLIENT|INFO: recieved a notification on an unexpected channel\n");
}
10 changes: 5 additions & 5 deletions example/imx8mm/passive_server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
microkit_msginfo protected(microkit_channel ch, microkit_msginfo msginfo)
{
switch (microkit_msginfo_get_label(msginfo)) {
case 0:
microkit_dbg_puts("server: is running on clients scheduling context\n");
case 1:
microkit_dbg_puts("SERVER|INFO: running on clients scheduling context\n");
break;
default:
microkit_dbg_puts("server: received an unexpected message\n");
microkit_dbg_puts("SERVER|ERROR: received an unexpected message\n");
}

return seL4_MessageInfo_new(0, 0, 0, 0);
}

void init(void)
{
microkit_dbg_puts("server: server protection domain init function running\n");
microkit_dbg_puts("SERVER|INFO: init function running\n");
/* Nothing to initialise */
}

void notified(microkit_channel ch)
{
microkit_dbg_puts("server: recieved a notification on an unexpected channel\n");
microkit_dbg_puts("SERVER|ERROR: recieved a notification on an unexpected channel\n");
}

0 comments on commit 2e0ef62

Please sign in to comment.