X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Facess.h;h=d2e1e8023c469b484c66a04756f28b714bff9f3d;hb=635bc78017d8a4a16314a973e39c849b2afac795;hp=95acb3136080665f969290b0e80b05ed87eb181d;hpb=203882b7bbd4aacaf5c4e99be0cca17455690585;p=tpg%2Facess2.git diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index 95acb313..d2e1e802 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -22,7 +22,6 @@ typedef Uint tGID; typedef Sint64 tTimestamp; typedef struct sShortSpinlock tShortSpinlock; typedef struct sMutex tMutex; -typedef struct sSemaphore tSemaphore; struct sMutex { tShortSpinlock Protector; //!< Protector for the lock strucure @@ -32,14 +31,6 @@ struct sMutex { struct sThread *LastWaiting; //!< Waiting threads }; -struct sSemaphore { - tShortSpinlock Protector; //!< Protector for the lock strucure - const char *Name; //!< Human-readable name - volatile int Value; //!< Current mutex value - struct sThread *Waiting; //!< Waiting threads - struct sThread *LastWaiting; //!< Waiting threads -}; - // --- Helper Macros --- /** * \name Helper Macros @@ -404,6 +395,9 @@ extern int Time_CreateTimer(int Delta, tTimerCallback *Callback, void *Argument) * \brief Removed an active timer */ extern void Time_RemoveTimer(int ID); +/** + * \brief Wait for a period of milliseconds + */ extern void Time_Delay(int Delay); /** * \} @@ -427,7 +421,7 @@ extern tGID Threads_GetGID(void); extern int SpawnTask(tThreadFunction Function, void *Arg); extern Uint *Threads_GetCfgPtr(int Id); extern int Threads_SetName(const char *NewName); -extern void Mutex_Acquire(tMutex *Mutex); +extern int Mutex_Acquire(tMutex *Mutex); extern void Mutex_Release(tMutex *Mutex); extern int Mutex_IsLocked(tMutex *Mutex); /**