rem: acquire_sem_etc(etherq->pop, 1, B_CAN_INTERRUPT, 0);
add: error = acquire_sem_etc(etherq->pop, 1, B_CAN_INTERRUPT, 0); if(error != B_NO_ERROR) return error;
context: int32 ether_input(void *data){	struct mbuf *m;		struct ether_header *eth;	int len;		while (1) {		len = sizeof(struct ether_header);		acquire_sem_etc(etherq->pop, 1, B_CAN_INTERRUPT, 0);		IFQ_DEQUEUE(etherq, m);		if (!m)			continue;		eth = mtod(m, struct ether_header *);		eth->ether_type = ntohs(eth->ether_type);		if (memcmp((void*)&eth->ether_dhost, (void*)&ether_bcast, 6) == 0)			m->m_flags |= M_BCAST;		if (eth->ether_dhost[0] & 1)			m->m_flags |= M_MCAST;		#if DEBUG			dump_ether_details(m);#endif		// as PPPoE needs the ethernet header we process it before m_adj		if(eth->ether_type == ETHERTYPE_PPPOEDISC				|| eth->ether_type == ETHERTYPE_PPPOE) {			if(pppoe_receiver)				pppoe_receiver(m);			else {				printf("PPPoE packet detected, but no handler found :(\n");				m_freem(m);			}						continue;		}				m_adj(m, len);				switch(eth->ether_type) {			case ETHERTYPE_ARP:				arpinput(m);				break;			case ETHERTYPE_IP:				if (proto[IPPROTO_IP] && proto[IPPROTO_IP]->pr_input)					proto[IPPROTO_IP]->pr_input(m, 0);				else					printf("proto[%d] = %p, not called...\n", IPPROTO_IP,					       proto[IPPROTO_IP]);				break;			default:				printf("Couldn't process unknown protocol %04x\n", eth->ether_type);				m_freem(m);		}	}		return 0;	}