Framework for exporting system header to user space (#59)
[lunaix-os.git] / lunaix-os / includes / usr / lunaix / types.h
index 9650b47a86badfaae05066800376829d7085f212..8a3410a77ace2a490dc3cf70d77c3a181924b99a 100644 (file)
@@ -1,40 +1,19 @@
-#ifndef __LUNAIX_SYS_TYPES_H
-#define __LUNAIX_SYS_TYPES_H
-
-#undef NULL
-#define NULL (void*)0
-#define NULLPTR 0
-
-#define PEXITTERM 0x100
-#define PEXITSTOP 0x200
-#define PEXITSIG 0x400
-
-#define PEXITNUM(flag, code) (flag | (code & 0xff))
-
-#define WNOHANG 1
-#define WUNTRACED 2
-#define WEXITSTATUS(wstatus) ((wstatus & 0xff))
-#define WIFSTOPPED(wstatus) ((wstatus & PEXITSTOP))
-#define WIFEXITED(wstatus)                                                     \
-    ((wstatus & PEXITTERM) && ((char)WEXITSTATUS(wstatus) >= 0))
-
-#define WIFSIGNALED(wstatus) ((wstatus & PEXITSIG))
-
-typedef signed long ssize_t;
-
-typedef int pid_t;
-
-typedef unsigned long size_t;
-
-typedef unsigned long off_t;
-
-typedef unsigned int ino_t;
-
-typedef struct dev_t
+#ifndef _LUNAIX_UHDR_SYS_TYPES_H
+#define _LUNAIX_UHDR_SYS_TYPES_H
+
+typedef int             __lunaix_pid_t;
+typedef int             __lunaix_tid_t;
+typedef int             __lunaix_uid_t;
+typedef int             __lunaix_gid_t;
+typedef unsigned long   __lunaix_size_t;
+typedef signed long     __lunaix_ssize_t;
+typedef unsigned int    __lunaix_ino_t;
+
+typedef struct
 {
     unsigned int meta;
-    unsigned int devident;
-    unsigned int dev_uid;
-} dev_t;
+    unsigned int unique;
+    unsigned int index;
+} __lunaix_dev_t;
 
-#endif /* __LUNAIX_TYPES_H */
+#endif /* _LUNAIX_UHDR_TYPES_H */