/*
 * Copyright (C) 2000-2002 ASANO Masahiro
 */

#include "def.h"

#define __KERNEL__
#include <asm/semaphore.h>

void
prhead_semaphore()
{
	mprintf(SPTR"  CNT SLEEP\n", "ADDR");
}

addr_t
print_semaphore(addr)
addr_t addr;
{
	struct semaphore sem;

	memread(addr, sizeof(struct semaphore), &sem, "semaphore");
	mprintf(FPTR " %4x %5x\n", addr, ATOMIC_READ(sem.count), sem.sleepers);
	return 0;
}
