1c8de8581b
B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a structure (thus breaking BeOS binary compatibility), containing a counter which is incremented whenever a thread has to wait for the spinlock. * Added macros for spinlock initialization and access and changed code using spinlocks accordingly. This breaks compilation for BeOS -- the macros should be defined in the respective compatibility wrappers. * Added generic syscall to get the spinlock counters for the thread and the team spinlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25752 a95241bf-73f2-0310-859d-f6bbb57e9c96
22 lines
485 B
C
22 lines
485 B
C
/*
|
|
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _SYSTEM_SPINLOCK_CONTENTION_H
|
|
#define _SYSTEM_SPINLOCK_CONTENTION_H
|
|
|
|
#include <OS.h>
|
|
|
|
|
|
#define SPINLOCK_CONTENTION "spinlock contention"
|
|
#define GET_SPINLOCK_CONTENTION_INFO 0x01
|
|
|
|
|
|
typedef struct spinlock_contention_info {
|
|
uint64 thread_spinlock_counter;
|
|
uint64 team_spinlock_counter;
|
|
} spinlock_contention_info;
|
|
|
|
|
|
#endif /* _SYSTEM_SPINLOCK_CONTENTION_H */
|