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:
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user