Remove mail_receive_nonblock ()
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m30s

This commit is contained in:
2026-03-18 23:24:07 +01:00
parent 837f7fa7ba
commit 53034bc091
6 changed files with 3 additions and 92 deletions

View File

@@ -274,35 +274,6 @@ DEFINE_SYSCALL (sys_mail_receive) {
return SYSRESULT (ST_OK);
}
/* int mail_receive_nonblock (void* recv_mesg, size_t mesg_size) */
DEFINE_SYSCALL (sys_mail_receive_nonblock) {
uint64_t fp;
uintptr_t uvaddr_mesg = a1;
size_t mesg_size = (size_t)a2;
spin_lock (&proc->lock, &fp);
struct procgroup* procgroup = proc->procgroup;
spin_unlock (&proc->lock, fp);
void* mesg = sys_get_user_buffer (procgroup, uvaddr_mesg, mesg_size);
if (mesg == NULL)
return SYSRESULT (-ST_BAD_ADDRESS_SPACE);
struct proc_resource* mail_resource = proc_find_resource (procgroup, 0);
if (mail_resource == NULL)
return SYSRESULT (-ST_NOT_FOUND);
bool r = proc_mail_receive_nonblock (proc, &mail_resource->u.mail, rctx, mesg, mesg_size);
if (r)
return SYSRESULT (ST_OK);
else
return SYSRESULT (-ST_TRY_AGAIN);
}
/* int device_do (int device_id, int cmd, void* a1, void* a2, void* a3, void* a4) */
DEFINE_SYSCALL (sys_device_do) {
uint64_t fpg, fd, fp;
@@ -1131,7 +1102,6 @@ static syscall_handler_func_t handler_table[] = {
[SYS_ENV_GET] = &sys_env_get,
[SYS_EXEC_PARTIAL] = &sys_exec_partial,
[SYS_EXEC_PARTIAL_FINI] = &sys_exec_partial_fini,
[SYS_MAIL_RECEIVE_NONBLOCK] = &sys_mail_receive_nonblock,
[SYS_GET_SELF_PID] = &sys_get_self_pid,
[SYS_STREAM_WRITE] = &sys_stream_write,
[SYS_STREAM_READ] = &sys_stream_read,