Skip to content

Commit

Permalink
Adhere to style checks 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 Sep 13, 2023
1 parent 0e99e87 commit 0ad7cae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
8 changes: 3 additions & 5 deletions example/imx8mm/passive_server/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

#include <microkit.h>

#define SERVER_CH 0
#define SERVER_CH 0

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

Expand All @@ -18,8 +17,7 @@ init(void)
(void) microkit_ppcall(SERVER_CH, microkit_msginfo_new(1, 1));
}

void
notified(microkit_channel ch)
void notified(microkit_channel ch)
{
microkit_dbg_puts("client: recieved a notification on an unexpected channel\n");
}
19 changes: 8 additions & 11 deletions example/imx8mm/passive_server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,26 @@

#include <microkit.h>

microkit_msginfo
protected(microkit_channel ch, microkit_msginfo msginfo)
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");
break;
default:
microkit_dbg_puts("server: received an unexpected message\n");
case 0:
microkit_dbg_puts("server: is running on clients scheduling context\n");
break;
default:
microkit_dbg_puts("server: received an unexpected message\n");
}

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

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

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

0 comments on commit 0ad7cae

Please sign in to comment.