#include <acess.h>
#include <threads.h>
+#define TRACE_LOCKS 1
+
extern int GetCPUNum(void);
// === CODE ===
__ASM__("cli");
Lock->IF = IF;
#endif
+
+ #if TRACE_LOCKS
+ Log_Log("LOCK", "%p locked by %p\n", Lock, __builtin_return_address(0));
+ #endif
}
/**
* \brief Release a short lock
*/
void SHORTREL(struct sShortSpinlock *Lock)
{
+ #if TRACE_LOCKS
+ Log_Log("LOCK", "%p released by %p\n", Lock, __builtin_return_address(0));
+ #endif
+
#if STACKED_LOCKS
if( Lock->Depth ) {
Lock->Depth --;