Lines Matching refs:fc

35 void init_ffsb_config(ffsb_config_t * fc, unsigned num_fs, unsigned num_tg)  in init_ffsb_config()  argument
37 memset(fc, 0, sizeof(ffsb_config_t)); in init_ffsb_config()
39 fc->num_totalthreads = -1; in init_ffsb_config()
40 fc->num_threadgroups = num_tg; in init_ffsb_config()
41 fc->num_filesys = num_fs; in init_ffsb_config()
43 fc->groups = ffsb_malloc(sizeof(ffsb_tg_t) * num_tg); in init_ffsb_config()
44 fc->filesystems = ffsb_malloc(sizeof(ffsb_fs_t) * num_fs); in init_ffsb_config()
47 void init_ffsb_config_1fs(ffsb_config_t * fc, ffsb_fs_t * fs, ffsb_tg_t * tg) in init_ffsb_config_1fs() argument
49 memset(fc, 0, sizeof(*fc)); in init_ffsb_config_1fs()
51 fc->num_totalthreads = tg_get_numthreads(tg); in init_ffsb_config_1fs()
52 fc->num_threadgroups = 1; in init_ffsb_config_1fs()
53 fc->num_filesys = 1; in init_ffsb_config_1fs()
55 fc->groups = tg; in init_ffsb_config_1fs()
56 fc->filesystems = fs; in init_ffsb_config_1fs()
59 void destroy_ffsb_config(ffsb_config_t * fc) in destroy_ffsb_config() argument
62 for (i = 0; i < fc->num_filesys; i++) in destroy_ffsb_config()
63 destroy_ffsb_fs(&fc->filesystems[i]); in destroy_ffsb_config()
65 for (i = 0; i < fc->num_threadgroups; i++) in destroy_ffsb_config()
66 destroy_ffsb_tg(&fc->groups[i]); in destroy_ffsb_config()
68 free(fc->groups); in destroy_ffsb_config()
69 free(fc->filesystems); in destroy_ffsb_config()
72 void fc_set_time(ffsb_config_t * fc, unsigned time) in fc_set_time() argument
74 fc->time = time; in fc_set_time()
77 unsigned fc_get_num_filesys(ffsb_config_t * fc) in fc_get_num_filesys() argument
79 return fc->num_filesys; in fc_get_num_filesys()
82 struct ffsb_tg *fc_get_tg(ffsb_config_t * fc, unsigned num) in fc_get_tg() argument
84 assert(num < fc->num_threadgroups); in fc_get_tg()
85 return &fc->groups[num]; in fc_get_tg()
88 struct ffsb_fs *fc_get_fs(ffsb_config_t * fc, unsigned num) in fc_get_fs() argument
90 assert(num < fc->num_filesys); in fc_get_fs()
91 return &fc->filesystems[num]; in fc_get_fs()
94 void fc_set_num_totalthreads(ffsb_config_t * fc, int num) in fc_set_num_totalthreads() argument
97 fc->num_totalthreads = num; in fc_set_num_totalthreads()
100 void fc_set_callout(ffsb_config_t * fc, char *callout) in fc_set_callout() argument
102 free(fc->callout); in fc_set_callout()
103 fc->callout = ffsb_strdup(callout); in fc_set_callout()
106 char *fc_get_callout(ffsb_config_t * fc) in fc_get_callout() argument
108 return fc->callout; in fc_get_callout()