Message passing / mail system
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m20s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m20s
This commit is contained in:
@@ -52,3 +52,15 @@ int read (const char* path, size_t off, uint8_t* buffer, size_t size) {
|
||||
int describe (const char* path, struct fs_desc_buffer* desc) {
|
||||
return (int)do_syscall (SYS_DESCRIBE, path, desc);
|
||||
}
|
||||
|
||||
int mail_send (int pgid, void* mesg, size_t mesg_size) {
|
||||
return (int)do_syscall (SYS_MAIL_SEND, pgid, mesg, mesg_size);
|
||||
}
|
||||
|
||||
int mail_receive (void* mesg, size_t mesg_size) {
|
||||
return (int)do_syscall (SYS_MAIL_RECEIVE, mesg, mesg_size);
|
||||
}
|
||||
|
||||
int get_procgroup (int pid) { return (int)do_syscall (SYS_GET_PROCGROUP, pid); }
|
||||
|
||||
int get_exec_pid (void) { return (int)do_syscall (SYS_GET_EXEC_PID, 0); }
|
||||
|
||||
@@ -65,4 +65,16 @@ int read (const char* path, size_t off, uint8_t* buffer, size_t size);
|
||||
/* describe a file */
|
||||
int describe (const char* path, struct fs_desc_buffer* desc);
|
||||
|
||||
/* send a message to a procgroup's mail */
|
||||
int mail_send (int pgid, void* mesg, size_t mesg_size);
|
||||
|
||||
/* receive a message from mail */
|
||||
int mail_receive (void* mesg, size_t mesg_size);
|
||||
|
||||
/* get procgroup id of a perticular process */
|
||||
int get_procgroup (int pid);
|
||||
|
||||
/* get PID of process, which exec'ed the current process */
|
||||
int get_exec_pid (void);
|
||||
|
||||
#endif // _LIBMSL_M_SYSTEM_H
|
||||
|
||||
Reference in New Issue
Block a user