Fixed port & sem debugger commands, fixed sem.c compilation with tracing

enabled, courtesy of Jack Burton.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6896 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-03-04 12:14:48 +00:00
parent c045684987
commit b752b6bb02
2 changed files with 6 additions and 6 deletions

View File

@ -122,7 +122,7 @@ _dump_port_info(struct port_entry *port)
dprintf("tail: %d\n", port->tail);
get_sem_count(port->read_sem, &cnt);
dprintf("read_sem: %ld\n", cnt);
get_sem_count(port->read_sem, &cnt);
get_sem_count(port->write_sem, &cnt);
dprintf("write_sem: %ld\n", cnt);
}
@ -139,7 +139,7 @@ dump_port_info(int argc, char **argv)
// if the argument looks like a hex number, treat it as such
if (strlen(argv[1]) > 2 && argv[1][0] == '0' && argv[1][1] == 'x') {
unsigned long num = atoul(argv[1]);
unsigned long num = strtoul(argv[1], NULL, 16);
if (num > KERNEL_BASE && num <= (KERNEL_BASE + (KERNEL_SIZE - 1))) {
// XXX semi-hack

View File

@ -124,7 +124,7 @@ dump_sem_info(int argc, char **argv)
// if the argument looks like a hex number, treat it as such
if (strlen(argv[1]) > 2 && argv[1][0] == '0' && argv[1][1] == 'x') {
unsigned long num = atoul(argv[1]);
unsigned long num = strtoul(argv[1], NULL, 16);
if (num > KERNEL_BASE && num <= (KERNEL_BASE + (KERNEL_SIZE - 1))) {
// XXX semi-hack
@ -375,7 +375,7 @@ sem_timeout(timer *data)
state = disable_interrupts();
GRAB_SEM_LOCK(gSems[slot]);
TRACE(("sem_timeout: called on 0x%x sem %d, tid %d\n", to, to->sem_id, to->thread_id));
TRACE(("sem_timeout: called on 0x%x sem %ld, tid %ld\n", data, args->blocked_sem_id, args->blocked_thread));
if (gSems[slot].id != args->blocked_sem_id) {
// this thread was not waiting on this semaphore
@ -470,8 +470,8 @@ acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout)
thread_enqueue(t, &gSems[slot].u.used.q);
if ((flags & (B_TIMEOUT | B_ABSOLUTE_TIMEOUT)) != 0) {
TRACE(("sem_acquire_etc: setting timeout sem for %d %d usecs, semid %d, tid %d\n",
timeout, sem_id, t->id));
TRACE(("sem_acquire_etc: setting timeout sem for %Ld usecs, semid %d, tid %d\n",
timeout, id, t->id));
// set up an event to go off with the thread struct as the data
args.blocked_sem_id = id;