我做了FreeBSD项目的要求是写四种系统调用:FreeBSD的数据结构和通信
1. set_containerid(int idnum, pid_t pid)
//set given pid's container ID to idnum
//child process should inherit parent's containerID
2.create_container(int perms, char *name)
//perm = 0 means allowing other processes to read/write this container
3.destroy_container(char *name)
4. write_container(char *name, char *message, int len)
5.read_container(char *name, char *message, int len)
所以,我知道我需要一个链表来保存自己的数据结构
Container{
char* name;
char* buf;
}
我在想我在哪里放这个链表,以便每个进程都可以访问它?
顺便说一下,允许更改系统文件。