Kernel/LibC: Implement SA_RESTART

I have been thinking how to do this for a long time but I finally
figured out a semi-clean way
This commit is contained in:
2025-04-22 02:42:44 +03:00
parent 34e680d792
commit 808c97020a
6 changed files with 16 additions and 7 deletions

View File

@@ -90,6 +90,7 @@ __BEGIN_DECLS
#define EXDEV 81
#define ENOTBLK 82
#define ERESTART 0xFE /* internal errno for SA_RESTART */
#define EUNKNOWN 0xFF
#define errno (*__errno_location())

View File

@@ -83,7 +83,10 @@ long syscall(long syscall, ...)
va_end(args);
long ret = Kernel::syscall(syscall, arg1, arg2, arg3, arg4, arg5);
long ret;
do
ret = Kernel::syscall(syscall, arg1, arg2, arg3, arg4, arg5);
while (ret == -ERESTART);
if (ret < 0)
{