Lines Matching refs:threadflow

87 static int flowoplib_fdnum(threadflow_t *threadflow, flowop_t *flowop);
88 static int flowoplib_print(threadflow_t *threadflow, flowop_t *flowop);
89 static int flowoplib_write(threadflow_t *threadflow, flowop_t *flowop);
90 static int flowoplib_read(threadflow_t *threadflow, flowop_t *flowop);
92 static int flowoplib_block(threadflow_t *threadflow, flowop_t *flowop);
93 static int flowoplib_wakeup(threadflow_t *threadflow, flowop_t *flowop);
94 static int flowoplib_hog(threadflow_t *threadflow, flowop_t *flowop);
95 static int flowoplib_delay(threadflow_t *threadflow, flowop_t *flowop);
96 static int flowoplib_sempost(threadflow_t *threadflow, flowop_t *flowop);
98 static int flowoplib_semblock(threadflow_t *threadflow, flowop_t *flowop);
115 static int flowoplib_appendfile(threadflow_t *threadflow, flowop_t *flowop);
116 static int flowoplib_appendfilerand(threadflow_t *threadflow, flowop_t *flowop);
117 static int flowoplib_deletefile(threadflow_t *threadflow, flowop_t *flowop);
118 static int flowoplib_statfile(threadflow_t *threadflow, flowop_t *flowop);
119 static int flowoplib_finishoncount(threadflow_t *threadflow, flowop_t *flowop);
120 static int flowoplib_finishonbytes(threadflow_t *threadflow, flowop_t *flowop);
121 static int flowoplib_fsyncset(threadflow_t *threadflow, flowop_t *flowop);
122 static int flowoplib_testrandvar(threadflow_t *threadflow, flowop_t *flowop);
333 flowoplib_fdnum(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_fdnum() argument
362 if (threadflow->tf_fdrotor == 0) in flowoplib_fdnum()
363 threadflow->tf_fdrotor = THREADFLOW_MAXFD; in flowoplib_fdnum()
366 if (entries == (THREADFLOW_MAXFD - threadflow->tf_fdrotor)) in flowoplib_fdnum()
367 threadflow->tf_fdrotor = THREADFLOW_MAXFD; in flowoplib_fdnum()
370 threadflow->tf_fdrotor--; in flowoplib_fdnum()
372 threadflow->tf_fdrotor); in flowoplib_fdnum()
373 return (threadflow->tf_fdrotor); in flowoplib_fdnum()
384 flowoplib_filesetup(threadflow_t *threadflow, flowop_t *flowop, in flowoplib_filesetup() argument
387 int fd = flowoplib_fdnum(threadflow, flowop); in flowoplib_filesetup()
393 if ((fd > 0) && (threadflow->tf_fse[fd] != NULL)) { in flowoplib_filesetup()
397 avd_get_str(threadflow->tf_fse[fd]->fse_fileset->fs_name); in flowoplib_filesetup()
414 if (threadflow->tf_fd[fd].fd_ptr == NULL) { in flowoplib_filesetup()
418 threadflow, flowop, fd)) != FILEBENCH_OK) in flowoplib_filesetup()
421 if (threadflow->tf_fse[fd]) { in flowoplib_filesetup()
423 threadflow->tf_fse[fd]->fse_path); in flowoplib_filesetup()
432 *fdescp = &(threadflow->tf_fd[fd]); in flowoplib_filesetup()
435 if (threadflow->tf_fse[fd]) in flowoplib_filesetup()
436 *wssp = threadflow->tf_fse[fd]->fse_size; in flowoplib_filesetup()
449 flowoplib_iobufsetup(threadflow_t *threadflow, flowop_t *flowop, in flowoplib_iobufsetup() argument
461 if ((memsize = threadflow->tf_constmemsize) != 0) { in flowoplib_iobufsetup()
471 *iobufp = threadflow->tf_mem + memoffset; in flowoplib_iobufsetup()
503 flowoplib_iosetup(threadflow_t *threadflow, flowop_t *flowop, in flowoplib_iosetup() argument
508 if ((ret = flowoplib_filesetup(threadflow, flowop, wssp, filedescp)) != in flowoplib_iosetup()
512 if ((ret = flowoplib_iobufsetup(threadflow, flowop, iobufp, iosize)) != in flowoplib_iosetup()
536 flowoplib_read(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_read() argument
546 if ((ret = flowoplib_iosetup(threadflow, flowop, &wss, &iobuf, in flowoplib_read()
561 (void) flowop_beginop(threadflow, flowop); in flowoplib_read()
564 (void) flowop_endop(threadflow, flowop, 0); in flowoplib_read()
570 flowop_endop(threadflow, flowop, 0); in flowoplib_read()
573 (void) flowop_endop(threadflow, flowop, ret); in flowoplib_read()
579 (void) flowop_beginop(threadflow, flowop); in flowoplib_read()
581 (void) flowop_endop(threadflow, flowop, 0); in flowoplib_read()
586 (void) flowop_endop(threadflow, flowop, 0); in flowoplib_read()
589 (void) flowop_endop(threadflow, flowop, ret); in flowoplib_read()
618 flowoplib_block(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_block() argument
624 flowop_beginop(threadflow, flowop); in flowoplib_block()
626 flowop_endop(threadflow, flowop, 0); in flowoplib_block()
647 flowoplib_wakeup(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_wakeup() argument
660 threadflow->tf_name); in flowoplib_wakeup()
684 flowop_beginop(threadflow, flowop); in flowoplib_wakeup()
688 flowop_endop(threadflow, flowop, 0); in flowoplib_wakeup()
709 flowoplib_hog(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_hog() argument
715 flowop_beginop(threadflow, flowop); in flowoplib_hog()
716 if (threadflow->tf_mem != NULL) { in flowoplib_hog()
718 *(threadflow->tf_mem) = 1; in flowoplib_hog()
720 flowop_endop(threadflow, flowop, 0); in flowoplib_hog()
730 flowoplib_delay(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_delay() argument
734 flowop_beginop(threadflow, flowop); in flowoplib_delay()
736 flowop_endop(threadflow, flowop, 0); in flowoplib_delay()
758 flowoplib_eventlimit(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_eventlimit() argument
766 flowop, threadflow->tf_name, threadflow->tf_instance); in flowoplib_eventlimit()
770 flowop_beginop(threadflow, flowop); in flowoplib_eventlimit()
783 flowop_endop(threadflow, flowop, 0); in flowoplib_eventlimit()
788 flowoplib_event_find_target(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_event_find_target() argument
795 threadflow->tf_thrd_fops); in flowoplib_event_find_target()
817 flowoplib_iopslimit(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_iopslimit() argument
829 flowop, threadflow->tf_name, threadflow->tf_instance); in flowoplib_iopslimit()
832 if (flowoplib_event_find_target(threadflow, flowop) in flowoplib_iopslimit()
871 flowop_endop(threadflow, flowop, 0); in flowoplib_iopslimit()
878 flowop_beginop(threadflow, flowop); in flowoplib_iopslimit()
893 flowop_endop(threadflow, flowop, 0); in flowoplib_iopslimit()
905 flowoplib_opslimit(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_opslimit() argument
917 flowop, threadflow->tf_name, threadflow->tf_instance); in flowoplib_opslimit()
920 if (flowoplib_event_find_target(threadflow, flowop) in flowoplib_opslimit()
945 flowop_endop(threadflow, flowop, 0); in flowoplib_opslimit()
952 flowop_beginop(threadflow, flowop); in flowoplib_opslimit()
966 flowop_endop(threadflow, flowop, 0); in flowoplib_opslimit()
980 flowoplib_bwlimit(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_bwlimit() argument
992 flowop, threadflow->tf_name, threadflow->tf_instance); in flowoplib_bwlimit()
995 if (flowoplib_event_find_target(threadflow, flowop) in flowoplib_bwlimit()
1035 flowop_endop(threadflow, flowop, 0); in flowoplib_bwlimit()
1045 flowop_beginop(threadflow, flowop); in flowoplib_bwlimit()
1059 flowop_endop(threadflow, flowop, 0); in flowoplib_bwlimit()
1078 flowoplib_finishonbytes(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_finishonbytes() argument
1086 flowop, threadflow->tf_name, threadflow->tf_instance); in flowoplib_finishonbytes()
1089 if (flowoplib_event_find_target(threadflow, flowop) in flowoplib_finishonbytes()
1112 flowop_beginop(threadflow, flowop); in flowoplib_finishonbytes()
1114 flowop_endop(threadflow, flowop, 0); in flowoplib_finishonbytes()
1117 flowop_endop(threadflow, flowop, 0); in flowoplib_finishonbytes()
1129 flowoplib_finishoncount(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_finishoncount() argument
1136 flowop, threadflow->tf_name, threadflow->tf_instance); in flowoplib_finishoncount()
1139 if (flowoplib_event_find_target(threadflow, flowop) in flowoplib_finishoncount()
1152 flowop_beginop(threadflow, flowop); in flowoplib_finishoncount()
1154 flowop_endop(threadflow, flowop, 0); in flowoplib_finishoncount()
1157 flowop_endop(threadflow, flowop, 0); in flowoplib_finishoncount()
1249 flowoplib_semblock(threadflow_t *threadflow, flowop_t *flowop) in flowoplib_semblock() argument
1278 flowop_beginop(threadflow, flowop); in flowoplib_semblock()
1291 flowop_endop(threadflow, flowop, 0); in flowoplib_semblock()
1338 flowoplib_sempost(threadflow_t *threadflow, flowop_t *flowop) argument
1357 threadflow->tf_name);
1370 flowop_beginop(threadflow, flowop);
1446 flowop_endop(threadflow, flowop, 0);
1475 flowoplib_openfile(threadflow_t *threadflow, flowop_t *flowop) argument
1477 int fd = flowoplib_fdnum(threadflow, flowop);
1482 return (flowoplib_openfile_common(threadflow, flowop, fd));
1498 flowoplib_openfile_common(threadflow_t *threadflow, flowop_t *flowop, int fd) argument
1531 tid = threadflow->tf_utid;
1533 if (threadflow->tf_fd[fd].fd_ptr != NULL) {
1561 if (FB_OPEN(&(threadflow->tf_fd[fd]), name,
1571 (void) directio(threadflow->tf_fd[fd].fd_num, DIRECTIO_ON);
1574 threadflow->tf_fse[fd] = NULL;
1588 threadflow->tf_fse[fd] = file;
1590 flowop_beginop(threadflow, flowop);
1591 err = fileset_openfile(&threadflow->tf_fd[fd], flowop->fo_fileset,
1593 flowop_endop(threadflow, flowop, 0);
1603 flowop->fo_name, file->fse_path, fd, threadflow->tf_fd[fd]);
1621 flowoplib_createfile(threadflow_t *threadflow, flowop_t *flowop) argument
1627 if (threadflow->tf_fd[fd].fd_ptr != NULL) {
1665 threadflow->tf_fse[fd] = file;
1667 flowop_beginop(threadflow, flowop);
1668 err = fileset_openfile(&threadflow->tf_fd[fd], flowop->fo_fileset,
1670 flowop_endop(threadflow, flowop, 0);
1680 flowop->fo_name, file->fse_path, fd, threadflow->tf_fd[fd]);
1695 flowoplib_deletefile(threadflow_t *threadflow, flowop_t *flowop) argument
1704 if ((fd > 0) && ((file = threadflow->tf_fse[fd]) != NULL)) {
1707 threadflow->tf_fse[fd] = NULL;
1760 if ((fd > 0) && (threadflow->tf_fd[fd].fd_num > 0)) {
1789 flowop_beginop(threadflow, flowop);
1791 flowop_endop(threadflow, flowop, 0);
1809 flowoplib_fsync(threadflow_t *threadflow, flowop_t *flowop) argument
1814 if (threadflow->tf_fd[fd].fd_ptr == NULL) {
1821 file = threadflow->tf_fse[fd];
1832 flowop_beginop(threadflow, flowop);
1833 (void) FB_FSYNC(&threadflow->tf_fd[fd]);
1834 flowop_endop(threadflow, flowop, 0);
1848 flowoplib_fsyncset(threadflow_t *threadflow, flowop_t *flowop) argument
1856 if ((threadflow->tf_fse[fd] == NULL) ||
1857 (flowop->fo_fileset != threadflow->tf_fse[fd]->fse_fileset))
1861 flowop_beginop(threadflow, flowop);
1862 (void) FB_FSYNC(&threadflow->tf_fd[fd]);
1863 flowop_endop(threadflow, flowop, 0);
1865 file = threadflow->tf_fse[fd];
1884 flowoplib_closefile(threadflow_t *threadflow, flowop_t *flowop) argument
1890 if (threadflow->tf_fd[fd].fd_ptr == NULL) {
1897 file = threadflow->tf_fse[fd];
1918 flowop_beginop(threadflow, flowop);
1919 (void) FB_CLOSE(&threadflow->tf_fd[fd]);
1920 flowop_endop(threadflow, flowop, 0);
1924 threadflow->tf_fd[fd].fd_ptr = NULL;
1975 flowoplib_makedir(threadflow_t *threadflow, flowop_t *flowop) argument
1988 flowop_beginop(threadflow, flowop);
1990 flowop_endop(threadflow, flowop, 0);
2007 flowoplib_removedir(threadflow_t *threadflow, flowop_t *flowop) argument
2020 flowop_beginop(threadflow, flowop);
2022 flowop_endop(threadflow, flowop, 0);
2042 flowoplib_listdir(threadflow_t *threadflow, flowop_t *flowop) argument
2068 flowop_beginop(threadflow, flowop);
2087 flowop_endop(threadflow, flowop, dir_bytes);
2103 flowoplib_statfile(threadflow_t *threadflow, flowop_t *flowop) argument
2111 if ((fd > 0) && (threadflow->tf_fd[fd].fd_num > 0)) {
2114 if ((file = threadflow->tf_fse[fd]) == NULL) {
2170 flowop_beginop(threadflow, flowop);
2174 flowop_endop(threadflow, flowop, 0);
2179 flowop_beginop(threadflow, flowop);
2180 if (FB_FSTAT(&threadflow->tf_fd[fd], &statbuf) == -1)
2183 flowop_endop(threadflow, flowop, 0);
2210 flowoplib_readwholefile(threadflow_t *threadflow, flowop_t *flowop) argument
2221 if ((ret = flowoplib_filesetup(threadflow, flowop, &wss,
2239 if (flowoplib_iobufsetup(threadflow, flowop, &iobuf,
2245 flowop_beginop(threadflow, flowop);
2250 flowop_endop(threadflow, flowop, bytes);
2278 flowoplib_write(threadflow_t *threadflow, flowop_t *flowop) argument
2287 if ((ret = flowoplib_iosetup(threadflow, flowop, &wss, &iobuf,
2301 flowop_beginop(threadflow, flowop);
2307 flowop_endop(threadflow, flowop, 0);
2310 flowop_endop(threadflow, flowop, iosize);
2312 flowop_beginop(threadflow, flowop);
2317 flowop_endop(threadflow, flowop, 0);
2320 flowop_endop(threadflow, flowop, iosize);
2335 flowoplib_writewholefile(threadflow_t *threadflow, flowop_t *flowop) argument
2350 if ((ret = flowoplib_filesetup(threadflow, flowop, &wss,
2368 if (flowoplib_iobufsetup(threadflow, flowop, &iobuf,
2373 file = threadflow->tf_fse[srcfd];
2386 flowop_beginop(threadflow, flowop);
2393 flowop_endop(threadflow, flowop, 0);
2399 flowop_endop(threadflow, flowop, bytes);
2422 flowoplib_appendfile(threadflow_t *threadflow, flowop_t *flowop) argument
2431 if ((ret = flowoplib_iosetup(threadflow, flowop, &wss, &iobuf,
2438 flowop_beginop(threadflow, flowop);
2445 flowop_endop(threadflow, flowop, ret);
2448 flowop_endop(threadflow, flowop, ret);
2470 flowoplib_appendfilerand(threadflow_t *threadflow, flowop_t *flowop) argument
2490 flowop_beginop(threadflow, flowop);
2491 flowop_endop(threadflow, flowop, 0LL);
2495 if ((ret = flowoplib_iosetup(threadflow, flowop, &wss, &iobuf,
2502 flowop_beginop(threadflow, flowop);
2510 flowop_endop(threadflow, flowop, 0);
2514 flowop_endop(threadflow, flowop, appendsize);
2533 flowoplib_testrandvar(threadflow_t *threadflow, flowop_t *flowop) argument
2610 flowoplib_print(threadflow_t *threadflow, flowop_t *flowop) argument
2614 procflow = threadflow->tf_process;
2618 threadflow->tf_name, threadflow->tf_instance,