Add some ipc related comments; Fix one dabort and iabort bug.

This commit is contained in:
TXuian
2024-03-07 14:21:47 +08:00
parent f6434bd573
commit 23d6224395
11 changed files with 30 additions and 12 deletions
+5 -1
View File
@@ -23,7 +23,7 @@ INC_DIR = -I$(KERNEL_ROOT)/services/shell/letter-shell \
-I$(KERNEL_ROOT)/services/boards/$(BOARD) \
-I$(KERNEL_ROOT)/services/app
all: init simple_client simple_server shell fs_server test_priority readme.txt | bin
all: init test_fs simple_client simple_server shell fs_server test_priority readme.txt | bin
../tools/mkfs/mkfs ./fs.img $^
@mv $(filter-out readme.txt, $^) bin
@mv *.o bin
@@ -40,6 +40,10 @@ init: init.o libfs_to_client.o libipc.o session.o libserial.o usyscall.o
@${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs}
@${objdump} -S $@ > $@.asm
test_fs: test_fs.o libfs_to_client.o libipc.o session.o libserial.o usyscall.o
@${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs}
@${objdump} -S $@ > $@.asm
simple_client: simple_client.o libserial.o libipc.o session.o simple_service.o libfs_to_client.o usyscall.o
@${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs}
@${objdump} -S $@ > $@.asm
@@ -15,6 +15,8 @@
#include "simple_service.h"
#include "usyscall.h"
/// @warning all the parameters should in the form of pointers
/// for the true storing memory of parameters is session(shared memory between tasks)
int IPC_DO_SERVE_FUNC(Ipc_add)(int* a, int* b)
{
return *a + *b;
+5 -3
View File
@@ -19,6 +19,7 @@
#include "libfs_to_client.h"
#include "usyscall.h"
#define BLOCK_SIZE 256
int main(int argc, char* argv[])
{
printf("file system test\n");
@@ -26,8 +27,6 @@ int main(int argc, char* argv[])
struct Session session;
connect_session(&session, "MemFS", 4096);
register_server("TEST_FS");
int fd;
char* fd_path = "/readme.txt";
fd = open(&session, fd_path);
@@ -43,9 +42,12 @@ int main(int argc, char* argv[])
printf("file content: %s\n", buffer);
close(&session, fd);
free_session(&session);
printf("file test done.\n");
printf("Test memry error %s.\n", 0x50000000);
printf("After error computing.\n");
exit();
return 0;
}