Lines Matching refs:fld

33 } *fld;  variable
37 flist_add(&ff->list, &fld->free_list); in put_filelock()
44 if (flist_empty(&fld->free_list)) in __get_filelock()
47 ff = flist_first_entry(&fld->free_list, struct fio_filelock, list); in __get_filelock()
61 fio_mutex_up(&fld->lock); in get_filelock()
63 fio_mutex_down(&fld->lock); in get_filelock()
74 fld = smalloc(sizeof(*fld)); in fio_filelock_init()
75 if (!fld) in fio_filelock_init()
78 INIT_FLIST_HEAD(&fld->list); in fio_filelock_init()
79 INIT_FLIST_HEAD(&fld->free_list); in fio_filelock_init()
81 if (__fio_mutex_init(&fld->lock, FIO_MUTEX_UNLOCKED)) in fio_filelock_init()
85 struct fio_filelock *ff = &fld->ffs[i]; in fio_filelock_init()
89 flist_add_tail(&ff->list, &fld->free_list); in fio_filelock_init()
100 if (!fld) in fio_filelock_exit()
103 assert(flist_empty(&fld->list)); in fio_filelock_exit()
104 __fio_mutex_remove(&fld->lock); in fio_filelock_exit()
106 while (!flist_empty(&fld->free_list)) { in fio_filelock_exit()
109 ff = flist_first_entry(&fld->free_list, struct fio_filelock, list); in fio_filelock_exit()
115 sfree(fld); in fio_filelock_exit()
116 fld = NULL; in fio_filelock_exit()
124 flist_for_each(entry, &fld->list) { in fio_hash_find()
162 flist_add(&ff->list, &fld->list); in fio_hash_get()
175 fio_mutex_down(&fld->lock); in __fio_lock_file()
179 fio_mutex_up(&fld->lock); in __fio_lock_file()
194 fio_mutex_down(&fld->lock); in __fio_lock_file()
205 fio_mutex_up(&fld->lock); in __fio_lock_file()
232 fio_mutex_down(&fld->lock); in fio_unlock_file()
245 fio_mutex_up(&fld->lock); in fio_unlock_file()