X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/a13ddcba315eaa75dca84dde30b17a78b2933354..642855f81fd03b9fd6540ac99c665b57b4b38cc8:/lunaix-os/includes/lunaix/syscall_utils.h diff --git a/lunaix-os/includes/lunaix/syscall_utils.h b/lunaix-os/includes/lunaix/syscall_utils.h new file mode 100644 index 0000000..fcc7dc3 --- /dev/null +++ b/lunaix-os/includes/lunaix/syscall_utils.h @@ -0,0 +1,10 @@ +#ifndef __LUNAIX_SYSCALL_UTILS_H +#define __LUNAIX_SYSCALL_UTILS_H + +#include +#include + +#define DO_STATUS(errno) SYSCALL_ESTATUS(__current->k_status = errno) +#define DO_STATUS_OR_RETURN(errno) ({ errno < 0 ? DO_STATUS(errno) : errno; }) + +#endif /* __LUNAIX_SYSCALL_UTILS_H */