- int fd, ret, mflag;
-
- fd = mkstemp(mutex_name);
- if (fd < 0) {
- perror("open mutex");
- return NULL;
- }
-
-#ifdef FIO_HAVE_FALLOCATE
- posix_fallocate(fd, 0, sizeof(struct fio_mutex));
-#endif
-
- if (ftruncate(fd, sizeof(struct fio_mutex)) < 0) {
- perror("ftruncate mutex");
- goto err;
- }