Fix userland exit() type

This commit is contained in:
TXuian
2024-05-16 14:44:41 +08:00
parent 56ec6edbe5
commit 0b858de120
13 changed files with 26 additions and 25 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ int main(int argc, char* argv[])
char* shell_task_param[2] = { "/shell", 0 };
if ((fd = open(&session, shell_task_param[0])) < 0) {
printf("Open %s failed\n", shell_task_param[0]);
exit();
exit(1);
}
if (spawn(&session, fd, read, fsize, shell_task_param[0], shell_task_param) < 0) {
@@ -37,6 +37,6 @@ int main(int argc, char* argv[])
close(&session, fd);
exit();
exit(0);
return 0;
}
@@ -12,6 +12,7 @@
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "libfs_to_client.h"
#include "libserial.h"
@@ -90,7 +91,7 @@ int main(int argc, char** argv)
struct Session session_nowait;
if (connect_session(&session_wait, "SimpleServer", 4096) < 0 || connect_session(&session_nowait, "SimpleServer", 4096) < 0) {
printf("connect session failed\n");
exit();
exit(1);
}
char *buf1 = NULL, *buf2 = NULL;
@@ -138,5 +139,5 @@ int main(int argc, char** argv)
free_session(&session_wait);
free_session(&session_nowait);
exit();
exit(0);
}
@@ -38,10 +38,10 @@ int main(int argc, char* argv[])
{
if (register_server("SimpleServer") < 0) {
printf("register server name: %s failed.\n", "SimpleServer");
exit();
exit(1);
}
ipc_server_loop(&IpcSimpleServer);
// never reached
exit();
exit(0);
}
+1 -1
View File
@@ -48,6 +48,6 @@ int main(int argc, char* argv[])
printf("Test memry error %s.\n", 0x50000000);
printf("After error computing.\n");
exit();
exit(0);
return 0;
}
@@ -24,12 +24,12 @@ int main(int argc, char* argv[])
struct Session session;
if (connect_session(&session, "TestIRQ", 4096) < 0) {
printf("connect session failed\n");
exit();
exit(1);
}
printf("%s start waiting for IRQ.\n", prog_name);
wait_intr(&session);
printf("%s return from waiting for IRQ.\n", prog_name);
exit();
exit(0);
}
@@ -40,16 +40,16 @@ int main()
{
if (register_irq(SW_INTERRUPT_3, Ipc_intr_3) < 0) {
printf("TEST_SW_HDLR: bind failed");
exit();
exit(1);
}
static char prog_name[] = "TestIRQ";
if (register_server("TestIRQ") < 0) {
printf("register server name: %s failed.\n", prog_name);
exit();
exit(1);
}
ipc_server_loop(&IpcSwIntrHandler);
exit();
exit(0);
}
@@ -39,6 +39,6 @@ int main(int argc, char* argv[])
// test function
count_down();
exit();
exit(0);
return 0;
}