MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / sys_command_close_internal

Function sys_command_close_internal

src/blkdev.cpp:309–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307 uae_sem_post (&st->sema);
308}
309static void sys_command_close_internal (int unitnum)
310{
311 struct blkdevstate *st = &state[unitnum];
312 getsem (unitnum, true);
313 st->waspaused = 0;
314 if (st->isopen <= 0)
315 write_log (_T("BUG unit %d close: opencnt=%d!\n"), unitnum, st->isopen);
316 if (st->device_func) {
317 state[unitnum].device_func->closedev (unitnum);
318 if (st->isopen > 0)
319 st->isopen--;
320 }
321 freesem (unitnum);
322 if (st->isopen == 0) {
323 uae_sem_destroy (&st->sema);
324 st->sema = NULL;
325 }
326}
327
328static int sys_command_open_internal (int unitnum, const TCHAR *ident, cd_standard_unit csu)
329{

Callers 2

sys_command_closeFunction · 0.85
blkdev_get_infoFunction · 0.85

Calls 4

getsemFunction · 0.85
freesemFunction · 0.85
uae_sem_destroyFunction · 0.85
write_logFunction · 0.70

Tested by

no test coverage detected