This commit is contained in:
lr
2024-05-31 09:40:35 +08:00
8 changed files with 128 additions and 85 deletions
@@ -30,7 +30,8 @@ int IPC_DO_SERVE_FUNC(Ipc_hello_string)(char* buf, int* len)
return 0;
}
IPC_SERVER_INTERFACE(Ipc_add, 2);
// IPC_SERVER_INTERFACE(Ipc_add, 2);
IPC_SERVER_THREAD_INTERFACE(Ipc_add, 2);
IPC_SERVER_INTERFACE(Ipc_hello_string, 2);
IPC_SERVER_REGISTER_INTERFACES(IpcSimpleServer, 2, Ipc_hello_string, Ipc_add);
@@ -23,18 +23,18 @@ int IPC_DO_SERVE_FUNC(Ipc_intr_3)(void* ignore)
int IPC_DO_SERVE_FUNC(Ipc_wait_intr_3)(void* ignore)
{
// delay the this handle
if (!has_one_interrupt) {
delay_session();
return -1;
while (!has_one_interrupt) {
yield(SYS_TASK_YIELD_NO_REASON);
}
// serve can be done by now
has_one_interrupt = false;
return 0;
}
IPC_SERVER_INTERFACE(Ipc_intr_3, 1);
IPC_SERVER_INTERFACE(Ipc_wait_intr_3, 1);
IPC_SERVER_THREAD_INTERFACE(Ipc_wait_intr_3, 1);
IPC_SERVER_REGISTER_INTERFACES(IpcSwIntrHandler, 2, Ipc_intr_3, Ipc_wait_intr_3);
int main()
{