BPTR gw_DevExpunge( struct _Regs* regs ) { struct AHIBase* device = (struct AHIBase*) GET_LONG( regs->a6 ); return DevExpunge( device ); }
BPTR gw_DevExpunge( void ) { struct AHIBase* device = (struct AHIBase*) REG_A6; return DevExpunge( device ); }
BPTR AXB_REG_FUNC DevClose(AXB_REG(struct IOStdReq *ior,a1), AXB_REG(struct DevBase *db,a6)) { BPTR seglist; /* call user cleanup */ UserDevClose(ior, db); /* remove user count */ db->db_Lib.lib_OpenCnt--; /* default close with expunge */ if ((db->db_Lib.lib_OpenCnt == 0) && (db->db_Lib.lib_Flags & LIBF_DELEXP)) { seglist = DevExpunge(db); } else { seglist = 0; } return seglist; }
BPTR ASMCALL DevClose ( REG(a1, struct AHIRequest *ioreq), REG(a6, struct AHIBase *AHIBase) ) { struct AHIDevUnit *iounit; BPTR seglist=0; if(AHIBase->ahib_DebugLevel >= AHI_DEBUG_LOW) { KPrintF("CloseDevice(0x%08lx)\n", ioreq); } ObtainSemaphore(&AHIBase->ahib_Lock); iounit= (struct AHIDevUnit *) ioreq->ahir_Std.io_Unit; ioreq->ahir_Std.io_Device = (struct Device *) -1; ioreq->ahir_Std.io_Unit = (struct Unit *) -1; if(iounit) { iounit->Unit.unit_OpenCnt--; if(!iounit->Unit.unit_OpenCnt) ExpungeUnit(iounit,AHIBase); } AHIBase->ahib_Library.lib_OpenCnt--; ReleaseSemaphore(&AHIBase->ahib_Lock); if(!AHIBase->ahib_Library.lib_OpenCnt) { if(AHIBase->ahib_Library.lib_Flags & LIBF_DELEXP) seglist=DevExpunge(AHIBase); } return seglist; }
BPTR ASMCALL gw_DevExpunge( REG( a6, struct AHIBase* device ) ) { return DevExpunge( device ); }