Use some debug output if something fails (since it definitely fails with Chart

and GLTeapot)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32624 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2009-08-23 06:55:18 +00:00
parent 9fbc65a94d
commit 97cccf16b0
+14 -7
View File
@@ -15,12 +15,11 @@
#include <DirectWindowPrivate.h> #include <DirectWindowPrivate.h>
#include <ServerProtocol.h> #include <ServerProtocol.h>
//#define DEBUG 3
#if DEBUG
#include <string.h>
#include <stdio.h> #include <stdio.h>
#endif #include <string.h>
//#define DEBUG 1
// We don't need this kind of locking, since the directDaemonFunc // We don't need this kind of locking, since the directDaemonFunc
// doesn't access critical shared data. // doesn't access critical shared data.
@@ -456,8 +455,12 @@ BDirectWindow::_DirectDaemon()
status = acquire_sem(fDisableSem); status = acquire_sem(fDisableSem);
} while (status == B_INTERRUPTED); } while (status == B_INTERRUPTED);
if (status < B_OK) if (status < B_OK) {
fprintf(stderr,
"DirectDaemon: failed to acquire direct sem\n",
strerror(status));
return -1; return -1;
}
#if DEBUG #if DEBUG
print_direct_buffer_info(*fBufferDesc); print_direct_buffer_info(*fBufferDesc);
@@ -480,9 +483,13 @@ BDirectWindow::_DirectDaemon()
// The app_server then waits (with a timeout) on this sem. // The app_server then waits (with a timeout) on this sem.
// If we aren't quick enough to release this sem, our app // If we aren't quick enough to release this sem, our app
// will be terminated by the app_server // will be terminated by the app_server
if (release_sem(fDisableSemAck) != B_OK) if ((status = release_sem(fDisableSemAck)) != B_OK) {
fprintf(stderr,
"DirectDaemon: failed to release sem: (%s)\n",
strerror(status));
return -1; return -1;
} }
}
return 0; return 0;
} }