* Reverted r33547, this closes bug #4782 - this is obviously a regression in
GCC4. * Adapted code accordingly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33592 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -78,16 +78,14 @@ typedef struct rw_lock {
|
|||||||
|
|
||||||
// static initializers
|
// static initializers
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
# define MUTEX_INITIALIZER(name) (mutex){ name, NULL, -1, 0 }
|
# define MUTEX_INITIALIZER(name) { name, NULL, -1, 0 }
|
||||||
# define RECURSIVE_LOCK_INITIALIZER(name) \
|
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), 0 }
|
||||||
(recursive_lock){ MUTEX_INITIALIZER(name), 0 }
|
|
||||||
#else
|
#else
|
||||||
# define MUTEX_INITIALIZER(name) (mutex){ name, NULL, 0, 0 }
|
# define MUTEX_INITIALIZER(name) { name, NULL, 0, 0 }
|
||||||
# define RECURSIVE_LOCK_INITIALIZER(name) \
|
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), -1, 0 }
|
||||||
(recursive_lock){ MUTEX_INITIALIZER(name), -1, 0 }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RW_LOCK_INITIALIZER(name) (rw_lock){ name, NULL, -1, 0, 0, 0 }
|
#define RW_LOCK_INITIALIZER(name) { name, NULL, -1, 0, 0, 0 }
|
||||||
|
|
||||||
|
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
|
|||||||
@@ -28,10 +28,11 @@ KDiskDevice::KDiskDevice(partition_id id)
|
|||||||
:
|
:
|
||||||
KPartition(id),
|
KPartition(id),
|
||||||
fDeviceData(),
|
fDeviceData(),
|
||||||
fLocker(RW_LOCK_INITIALIZER("disk device")),
|
|
||||||
fFD(-1),
|
fFD(-1),
|
||||||
fMediaStatus(B_ERROR)
|
fMediaStatus(B_ERROR)
|
||||||
{
|
{
|
||||||
|
rw_lock_init(&fLocker, "disk device");
|
||||||
|
|
||||||
Unset();
|
Unset();
|
||||||
fDevice = this;
|
fDevice = this;
|
||||||
fPublishedName = (char*)"raw";
|
fPublishedName = (char*)"raw";
|
||||||
|
|||||||
@@ -239,7 +239,6 @@ public:
|
|||||||
|
|
||||||
KDiskDeviceManager::KDiskDeviceManager()
|
KDiskDeviceManager::KDiskDeviceManager()
|
||||||
:
|
:
|
||||||
fLock(RECURSIVE_LOCK_INITIALIZER("disk device manager")),
|
|
||||||
fDevices(new(nothrow) DeviceMap),
|
fDevices(new(nothrow) DeviceMap),
|
||||||
fPartitions(new(nothrow) PartitionMap),
|
fPartitions(new(nothrow) PartitionMap),
|
||||||
fDiskSystems(new(nothrow) DiskSystemMap),
|
fDiskSystems(new(nothrow) DiskSystemMap),
|
||||||
@@ -250,6 +249,8 @@ KDiskDeviceManager::KDiskDeviceManager()
|
|||||||
fDeviceWatcher(new(nothrow) DeviceWatcher()),
|
fDeviceWatcher(new(nothrow) DeviceWatcher()),
|
||||||
fNotifications(new(nothrow) DiskNotifications)
|
fNotifications(new(nothrow) DiskNotifications)
|
||||||
{
|
{
|
||||||
|
recursive_lock_init(&fLock, "disk device manager");
|
||||||
|
|
||||||
if (InitCheck() != B_OK)
|
if (InitCheck() != B_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -260,10 +260,10 @@ MessagingArea::_CheckCommand(int32 offset, int32 &size)
|
|||||||
|
|
||||||
MessagingService::MessagingService()
|
MessagingService::MessagingService()
|
||||||
:
|
:
|
||||||
fLock(RECURSIVE_LOCK_INITIALIZER("messaging service")),
|
|
||||||
fFirstArea(NULL),
|
fFirstArea(NULL),
|
||||||
fLastArea(NULL)
|
fLastArea(NULL)
|
||||||
{
|
{
|
||||||
|
recursive_lock_init(&fLock, "messaging service");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user