X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/270869139db617e29a35bb9ded41087bb702f9ac..b297c96099a08a9f2b7e20e80a8f43515fabd714:/lunaix-os/includes/lunaix/types.h diff --git a/lunaix-os/includes/lunaix/types.h b/lunaix-os/includes/lunaix/types.h index f74c9b8..fe06333 100644 --- a/lunaix-os/includes/lunaix/types.h +++ b/lunaix-os/includes/lunaix/types.h @@ -2,6 +2,7 @@ #define __LUNAIX_TYPES_H #include +#include #include #include @@ -15,6 +16,9 @@ typedef unsigned int u32_t; typedef unsigned long ptr_t; typedef unsigned long reg_t; +typedef unsigned int uid_t; +typedef unsigned int gid_t; + #ifndef CONFIG_ARCH_BITS_64 typedef unsigned long long u64_t; #else @@ -47,7 +51,10 @@ typedef int bool; }) #define offset(data, off) \ - ((void*)(__ptr(data) + (off))) + ((typeof(data))(__ptr(data) + (off))) + +#define offset_t(data, type, off) \ + ((type*)(__ptr(data) + (off))) #define __ptr(val) ((ptr_t)(val))