rem: if(exi->exi_id) { _CPU_ISR_Disable(level); if(!(exi->flags&EXI_FLAG_ATTACH)) { if(__exi_probe(nChn)) { exi->CallbackEXT = ext_cb; __exi_clearirqs(nChn,1,0,0); __UnmaskIrq(IRQMASK((IRQ_EXI0_EXT+(nChn*3)))); exi->flags |= EXI_FLAG_ATTACH; ret = 1; } } _CPU_ISR_Restore(level); }
add: if(exi->exi_idtime) { ret = __exi_attach(nChn,ext_cb); } else ret = 0;
context: u32 EXI_Attach(u32 nChn,EXICallback ext_cb){	u32 id,level,ret = 0;	exibus_priv *exi = &eximap[nChn];	if(__exi_probe(nChn) && !exi->exi_id) EXI_GetID(nChn,EXI_DEVICE_0,&id);	_CPU_ISR_Disable(level);	if(exi->exi_id) {		_CPU_ISR_Disable(level);		if(!(exi->flags&EXI_FLAG_ATTACH)) {			if(__exi_probe(nChn)) {				exi->CallbackEXT = ext_cb;				__exi_clearirqs(nChn,1,0,0);				__UnmaskIrq(IRQMASK((IRQ_EXI0_EXT+(nChn*3))));				exi->flags |= EXI_FLAG_ATTACH;				ret = 1;			}		}		_CPU_ISR_Restore(level);	}	_CPU_ISR_Restore(level);#ifdef _EXI_DEBUG	printf("EXI_Attach(exi_id = %d)\n",id);#endif	return ret;	}