Like commit:
21628ec537c7 ("fio_sem, diskutil: introduce fio_shared_sem and use it for diskutil lock")
the stats sem is also potentially shared between processes, and hence
should be allocated and freed as a shared sem.
See the referenced commit, which has more details. Switch the stats sem
to be allocated in such a way that it's propagated properly between
processes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
void stat_init(void)
{
- stat_sem = fio_sem_init(FIO_SEM_UNLOCKED);
+ stat_sem = fio_shared_sem_init(FIO_SEM_UNLOCKED);
}
void stat_exit(void)
* have ended.
*/
fio_sem_down(stat_sem);
- fio_sem_remove(stat_sem);
+ fio_shared_sem_remove(stat_sem);
}
/*