mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
15 lines
267 B
C
15 lines
267 B
C
#include <kernel/syscalls.h>
|
|
#include <arch/cpu.h>
|
|
|
|
syscallret_t syscall_umask(context_t *, mode_t mode) {
|
|
syscallret_t ret = {
|
|
.errno = 0
|
|
};
|
|
|
|
mode &= 0777;
|
|
|
|
ret.ret = __atomic_exchange_n(¤t_thread()->proc->umask, mode, __ATOMIC_SEQ_CST);
|
|
|
|
return ret;
|
|
}
|