Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git] / lunaix-os / includes / lunaix / syscall_utils.h
index fcc7dc321c37d6016e80458b38c8171a2e745c1a..640e3860f63298a43aae91c4941b9a5c74440dc3 100644 (file)
@@ -4,7 +4,7 @@
 #include <lunaix/process.h>
 #include <lunaix/syscall.h>
 
-#define DO_STATUS(errno) SYSCALL_ESTATUS(__current->k_status = errno)
+#define DO_STATUS(errno) SYSCALL_ESTATUS(syscall_result(errno))
 #define DO_STATUS_OR_RETURN(errno) ({ errno < 0 ? DO_STATUS(errno) : errno; })
 
 #endif /* __LUNAIX_SYSCALL_UTILS_H */