Merge branch 'master' of git.mutabah.net:acess2
[tpg/acess2.git] / KernelLand / Kernel / include / acess.h
index 2cd2cff..c8cff88 100644 (file)
@@ -15,6 +15,8 @@
 #define PACKED __attribute__((packed))
 //! Mark a function as not returning
 #define NORETURN       __attribute__((noreturn))
+//! Mark a function (or variable) as deprecated
+#define DEPRECATED     __attribute__((deprecated))
 //! Mark a parameter as unused
 #define UNUSED(x)      UNUSED_##x __attribute__((unused))
 //! Get the offset of a member in a structure
@@ -36,6 +38,7 @@
 
 // --- Types ---
 typedef Uint32 tPID;   //!< Process ID type
+typedef Uint32 tPGID;  //!< Process Group ID type
 typedef Uint32 tTID;   //!< Thread ID Type
 typedef Uint32 tUID;   //!< User ID Type
 typedef Uint32 tGID;   //!< Group ID Type
@@ -43,6 +46,7 @@ typedef Sint64        tTimestamp;     //!< Timestamp (miliseconds since 00:00 1 Jan 1970)
 typedef Sint64 tTime;  //!< Same again
 typedef struct sShortSpinlock  tShortSpinlock; //!< Opaque (kinda) spinlock
 typedef int    bool;   //!< Boolean type
+typedef Uint64 off_t;  //!< VFS Offset
 
 // --- Helper Macros ---
 /**
@@ -90,6 +94,8 @@ extern const char gsGitHash[];
 #define CLONE_VM       0x10
 //! Don't copy user pages
 #define CLONE_NOUSER   0x20
+//! Inherit the parent's PGID
+#define CLONE_PGID     0x40
 /**
  * \}
  */
@@ -182,7 +188,7 @@ extern void Debug_HexDump(const char *Header, const void *Data, Uint Length);
 # define LEAVE_RET0()  return
 #endif
 #if SANITY
-# define ASSERT(expr) do{if(!(expr))Panic("%s: Assertion '"#expr"' failed",(char*)__func__);}while(0)
+# define ASSERT(expr) do{if(!(expr))Panic("%s:%i - %s: Assertion '"#expr"' failed",__FILE__,__LINE__,(char*)__func__);}while(0)
 #else
 # define ASSERT(expr)
 #endif
@@ -400,6 +406,7 @@ extern Uint32       SwapEndian32(Uint32 Val);
  * \{
  */
 extern int     vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args);
+extern int     snprintf(char *__s, size_t __n, const char *__format, ...);
 extern int     sprintf(char *__s, const char *__format, ...);
 extern size_t  strlen(const char *Str);
 extern char    *strcpy(char *__dest, const char *__src);
@@ -497,6 +504,7 @@ extern void Threads_Exit(int TID, int Status);
 extern void    Threads_Yield(void);
 extern void    Threads_Sleep(void);
 extern int     Threads_WakeTID(tTID Thread);
+extern tPGID   Threads_GetPGID(void);
 extern tPID    Threads_GetPID(void);
 extern tTID    Threads_GetTID(void);
 extern tUID    Threads_GetUID(void);

UCC git Repository :: git.ucc.asn.au