Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2008-2009, Axel Dörfler, [email protected].
|
||||
* Copyright 2005-2007, Ingo Weinhold, [email protected]. All rights reserved.
|
||||
* Copyright 2005-2011, Ingo Weinhold, [email protected].
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@@ -162,19 +162,19 @@ typedef AutoLocker<spinlock, InterruptsSpinLocking> InterruptsSpinLocker;
|
||||
|
||||
class ThreadCPUPinLocking {
|
||||
public:
|
||||
inline bool Lock(struct thread* thread)
|
||||
inline bool Lock(Thread* thread)
|
||||
{
|
||||
thread_pin_to_current_cpu(thread);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void Unlock(struct thread* thread)
|
||||
inline void Unlock(Thread* thread)
|
||||
{
|
||||
thread_unpin_from_current_cpu(thread);
|
||||
}
|
||||
};
|
||||
|
||||
typedef AutoLocker<struct thread, ThreadCPUPinLocking> ThreadCPUPinner;
|
||||
typedef AutoLocker<Thread, ThreadCPUPinLocking> ThreadCPUPinner;
|
||||
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
@@ -401,7 +401,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
void _Resize(ValueType** newTable, size_t newSize, void** oldTable = NULL)
|
||||
void _Resize(ValueType** newTable, size_t newSize, void** _oldTable = NULL)
|
||||
{
|
||||
for (size_t i = 0; i < newSize; i++)
|
||||
newTable[i] = NULL;
|
||||
@@ -416,11 +416,12 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
if (oldTable != NULL)
|
||||
*oldTable = fTable;
|
||||
if (_oldTable != NULL)
|
||||
*_oldTable = fTable;
|
||||
else
|
||||
fAllocator.Free(fTable);
|
||||
}
|
||||
} else if (_oldTable != NULL)
|
||||
*_oldTable = NULL;
|
||||
|
||||
fTableSize = newSize;
|
||||
fTable = newTable;
|
||||
|
||||
Reference in New Issue
Block a user