| 307 | uae_sem_post (&st->sema); |
| 308 | } |
| 309 | static 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 | |
| 328 | static int sys_command_open_internal (int unitnum, const TCHAR *ident, cd_standard_unit csu) |
| 329 | { |
no test coverage detected