rem: if(priv->state==ERR_TXPENDING) { LWP_SleepThread(wait_tx_queue); _CPU_ISR_Restore(level);
add: while(priv->state==ERR_TXPENDING) { if(LWP_SleepThread(wait_tx_queue)==-1) break;
context: static u32 __bba_tx_stop(struct bba_priv *priv){	u32 level;	err_t state;	_CPU_ISR_Disable(level);	state = priv->state;	if(priv->state==ERR_TXPENDING) {		LWP_SleepThread(wait_tx_queue);		_CPU_ISR_Restore(level);	}	priv->state = ERR_TXPENDING;	_CPU_ISR_Restore(level);	LWIP_DEBUGF(NETIF_DEBUG,("__bba_tx_stop(%p,%s,%p)\n",priv,state==ERR_TXPENDING?"ERR_TXPENDING":"ERR_OK",LWP_GetSelf()));	return 1;}