// --- 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
#define CLONE_VM 0x10
//! Don't copy user pages
#define CLONE_NOUSER 0x20
+//! Inherit the parent's PGID
+#define CLONE_PGID 0x40
/**
* \}
*/
* \return Virtual address of page in memory
* \note There is only a limited ammount of slots avaliable
*/
-extern tVAddr MM_MapTemp(tPAddr PAddr);
+extern void *MM_MapTemp(tPAddr PAddr);
/**
* \brief Free a temporarily mapped page
* \param VAddr Allocate virtual addres of page
*/
-extern void MM_FreeTemp(tVAddr VAddr);
+extern void MM_FreeTemp(void *Ptr);
/**
* \brief Map a physcal address range into the virtual address space
* \param PAddr Physical address to map in
#ifdef __BIG_ENDIAN__
#define LittleEndian16(_val) SwapEndian16(_val)
#define LittleEndian32(_val) SwapEndian32(_val)
+#define LittleEndian64(_val) SwapEndian32(_val)
#define BigEndian16(_val) (_val)
#define BigEndian32(_val) (_val)
+#define BigEndian64(_val) (_val)
#else
#define LittleEndian16(_val) (_val)
#define LittleEndian32(_val) (_val)
+#define LittleEndian64(_val) (_val)
#define BigEndian16(_val) SwapEndian16(_val)
#define BigEndian32(_val) SwapEndian32(_val)
+#define BigEndian64(_val) SwapEndian64(_val)
#endif
extern Uint16 SwapEndian16(Uint16 Val);
extern Uint32 SwapEndian32(Uint32 Val);
+extern Uint64 SwapEndian64(Uint64 Val);
/**
* \}
*/
* \}
*/
+#include <ctype.h>
+
/**
* \brief Get a random number
* \return Random number
*/
/**
* \brief Create a timestamp from a time
+ * \note Days/Months are zero-based (e.g. December is 11, and has a day range of 0-30)
*/
extern tTime timestamp(int sec, int mins, int hrs, int day, int month, int year);
/**
* \brief Extract the date/time from a timestamp
+ * \note Days/Months are zero-based (e.g. December is 11, and has a day range of 0-30)
*/
extern void format_date(tTime TS, int *year, int *month, int *day, int *hrs, int *mins, int *sec, int *ms);
/**
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);