This is a toy project I am doing which is a course project given in last summer from our school.(I didn't register that course, and now just do it for practice.)
The main idea is to implement a process lock. Add several system calls. Such as :
Instructor also said "You will need to be using linked list(s) to keep track of the locks inside the kernel. "
The question is here: how can I keep track of the locks inside the kernel? Should I save it as a file? or anything I can do? Stuck here.....need help.
Thank you !
The main idea is to implement a process lock. Add several system calls. Such as :
Code:
516 AUE_NULL STD { int set_lgname(char *lgn, int pid); } // set lock group name
517 AUE_NULL STD { int get_lgname(char *lgn); } // get lock group name
518 AUE_NULL STD { int create_lock(char *name, int perms); }
519 AUE_NULL STD { int set_lock(char *name, int slpflg); }
520 AUE_NULL STD { int clear_lock(char *name); }
521 AUE_NULL STD { int check_lock(char *name); }
522 AUE_NULL STD { int destroy_lock(char *name); }
Instructor also said "You will need to be using linked list(s) to keep track of the locks inside the kernel. "
The question is here: how can I keep track of the locks inside the kernel? Should I save it as a file? or anything I can do? Stuck here.....need help.
Thank you !