rem: dprintf("port_count: invalid port_id %d\n", id);
add: dprintf("port_count: invalid port_id %ld\n", id);
context: port_count(port_id id){	int slot;	int state;	int count;		if(ports_active == false)		return B_BAD_PORT_ID;	if(id < 0)		return B_BAD_PORT_ID;	slot = id % MAX_PORTS;	state = disable_interrupts();	GRAB_PORT_LOCK(ports[slot]);	if(ports[slot].id != id) {		RELEASE_PORT_LOCK(ports[slot]);		restore_interrupts(state);		dprintf("port_count: invalid port_id %d\n", id);		return B_BAD_PORT_ID;	}		get_sem_count(ports[slot].read_sem, &count);	// do not return negative numbers 	if (count < 0)		count = 0;	RELEASE_PORT_LOCK(ports[slot]);	restore_interrupts(state);	// return count of messages (sem_count)	return count;}