InterruptsSpinLocking:
* Removed unused inner struct State. * Added work-around for the extremely annoying "fState my be used uninitialized" warning gcc 4 produces. I'm not aware of any solution that doesn't generate unnecessary code. :-/ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31193 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6a6974b63e
commit
91393e7810
@ -132,15 +132,15 @@ typedef AutoLocker<spinlock, SpinLocking> SpinLocker;
|
||||
// InterruptsSpinLocking
|
||||
class InterruptsSpinLocking {
|
||||
public:
|
||||
struct State {
|
||||
State(spinlock* lock)
|
||||
: lock(lock)
|
||||
{
|
||||
}
|
||||
|
||||
int state;
|
||||
spinlock* lock;
|
||||
};
|
||||
// NOTE: work-around for annoying GCC 4 "fState may be used uninitialized"
|
||||
// warning.
|
||||
#if __GNUC__ == 4
|
||||
InterruptsSpinLocking()
|
||||
:
|
||||
fState(0)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
inline bool Lock(spinlock* lockable)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user