Lines Matching refs:wp_cnt
81 static int bp_accounting(int wp_cnt, int share) in bp_accounting() argument
84 int i, fd[wp_cnt], fd_wp, ret; in bp_accounting()
86 for (i = 0; i < wp_cnt; i++) { in bp_accounting()
107 for (i = 0; i < wp_cnt; i++) in bp_accounting()
151 static int detect_share(int wp_cnt, int bp_cnt) in detect_share() argument
156 if (wp_cnt + bp_cnt == 0) in detect_share()
159 fd = malloc(sizeof(int) * (wp_cnt + bp_cnt)); in detect_share()
163 for (i = 0; i < wp_cnt; i++) { in detect_share()
171 for (; i < (bp_cnt + wp_cnt); i++) { in detect_share()
177 ret = i != (bp_cnt + wp_cnt); in detect_share()
204 int wp_cnt = detect_cnt(false); in test__bp_accounting() local
206 int share = detect_share(wp_cnt, bp_cnt); in test__bp_accounting()
214 wp_cnt, bp_cnt, has_ioctl, share); in test__bp_accounting()
216 if (!wp_cnt || !bp_cnt || !has_ioctl) in test__bp_accounting()
219 return bp_accounting(wp_cnt, share); in test__bp_accounting()