Remove debugging output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2767 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,15 +16,6 @@
|
|||||||
#include "RPartition.h"
|
#include "RPartition.h"
|
||||||
#include "RSession.h"
|
#include "RSession.h"
|
||||||
|
|
||||||
// print_time
|
|
||||||
void
|
|
||||||
print_time(const char *format, bigtime_t &time)
|
|
||||||
{
|
|
||||||
bigtime_t lastTime = time;
|
|
||||||
time = system_time();
|
|
||||||
printf("%lld: %s took: %lld us\n", time, format, time - lastTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
// priorities of the different message kinds
|
// priorities of the different message kinds
|
||||||
enum {
|
enum {
|
||||||
REQUEST_PRIORITY = 0,
|
REQUEST_PRIORITY = 0,
|
||||||
@@ -90,15 +81,10 @@ DiskDeviceManager::MessageReceived(BMessage *message)
|
|||||||
case B_REG_NEXT_DISK_DEVICE:
|
case B_REG_NEXT_DISK_DEVICE:
|
||||||
case B_REG_GET_DISK_DEVICE:
|
case B_REG_GET_DISK_DEVICE:
|
||||||
case B_REG_UPDATE_DISK_DEVICE:
|
case B_REG_UPDATE_DISK_DEVICE:
|
||||||
{
|
|
||||||
bigtime_t time = system_time();
|
|
||||||
print_time("getting message", time);
|
|
||||||
DetachCurrentMessage();
|
DetachCurrentMessage();
|
||||||
if (!_PushMessage(message, REQUEST_PRIORITY))
|
if (!_PushMessage(message, REQUEST_PRIORITY))
|
||||||
delete message;
|
delete message;
|
||||||
print_time("pushing message into priority queue", time);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case B_REG_DEVICE_START_WATCHING:
|
case B_REG_DEVICE_START_WATCHING:
|
||||||
case B_REG_DEVICE_STOP_WATCHING:
|
case B_REG_DEVICE_STOP_WATCHING:
|
||||||
DetachCurrentMessage();
|
DetachCurrentMessage();
|
||||||
@@ -155,9 +141,7 @@ DiskDeviceManager::_NextDiskDeviceRequest(BMessage *request)
|
|||||||
void
|
void
|
||||||
DiskDeviceManager::_GetDiskDeviceRequest(BMessage *request)
|
DiskDeviceManager::_GetDiskDeviceRequest(BMessage *request)
|
||||||
{
|
{
|
||||||
bigtime_t time = system_time();
|
|
||||||
Lock();
|
Lock();
|
||||||
print_time("locking", time);
|
|
||||||
status_t error = B_OK;
|
status_t error = B_OK;
|
||||||
// get the device
|
// get the device
|
||||||
RDiskDevice *device = NULL;
|
RDiskDevice *device = NULL;
|
||||||
@@ -172,7 +156,6 @@ print_time("locking", time);
|
|||||||
device = partition->Device();
|
device = partition->Device();
|
||||||
} else
|
} else
|
||||||
error = B_BAD_VALUE;
|
error = B_BAD_VALUE;
|
||||||
print_time("finding device", time);
|
|
||||||
// archive device and add it to the reply message
|
// archive device and add it to the reply message
|
||||||
BMessage reply(B_REG_RESULT);
|
BMessage reply(B_REG_RESULT);
|
||||||
if (device) {
|
if (device) {
|
||||||
@@ -182,13 +165,10 @@ print_time("finding device", time);
|
|||||||
error = reply.AddMessage("device", &deviceArchive);
|
error = reply.AddMessage("device", &deviceArchive);
|
||||||
} else // requested object not found
|
} else // requested object not found
|
||||||
error = B_ENTRY_NOT_FOUND;
|
error = B_ENTRY_NOT_FOUND;
|
||||||
print_time("archiving device", time);
|
|
||||||
// add result and send reply
|
// add result and send reply
|
||||||
reply.AddInt32("result", error);
|
reply.AddInt32("result", error);
|
||||||
request->SendReply(&reply);
|
request->SendReply(&reply);
|
||||||
print_time("sending reply", time);
|
|
||||||
Unlock();
|
Unlock();
|
||||||
print_time("unlocking", time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// _UpdateDiskDeviceRequest
|
// _UpdateDiskDeviceRequest
|
||||||
|
|||||||
Reference in New Issue
Block a user