Lines Matching defs:file

49  *  all of whom mmap the same file, make a given number of accesses
52 * Each time a child is forked, it stats the file and maps the full
53 * length of the file. Meanwhile, another child is forked which
54 * continually writes to the file. It loops writing some bytes (default
55 * 20), then sleeps some seconds (default 1). This causes the file
57 * Then it forks yet *another* child who maps the file in extend
59 * 0 padding at end of file, children can't test as exactly as in tmmap -
65 * file to make sure it has the correct data.
86 * actual initial file size is sparseoffset +
92 * -o - randomize offset of file to map. (default is 0)
94 * -l - if set, the output file is not removed on
98 * Compile with -DLARGE_FILE to enable file sizes > 2 GB.
127 void child_mapper(char *file, unsigned procno, unsigned nprocs);
128 void child_writer(char *file, uchar_t * buf);
129 int fileokay(char *file, uchar_t * expbuf);
278 (void)printf("creating file <%s> with %Ld bytes, pattern %d\n",
281 (void)printf("creating file <%s> with %ld bytes, pattern %d\n",
400 * write to (and grow) the file.
479 * Finished! Check the file for sanity, then kill all
494 if (no_prob) { /* only check file if no errors */
496 (void)fprintf(stderr, "file data incorrect!\n");
497 (void)printf(" leaving file <%s>\n", filename);
501 (void)printf("file data okay\n");
506 (void)printf(" leaving file <%s>\n", filename);
515 * Child process that reads/writes map. The child stats the file
516 * to determine the size, maps the size of the file, then reads/writes
521 void child_mapper(char *file, unsigned procno, unsigned nprocs)
560 if ((fd_mapper = open64(file, O_RDWR)) == -1) {
562 if ((fd_mapper = open(file, O_RDWR)) == -1) {
635 * Because one child is mapping file in extend mode,
681 * the file. The purpose of this is to exercise the code
687 void child_writer(char *file, uchar_t * buf)
714 if ((fd_writer = open64(file, O_RDWR)) == -1) {
716 if ((fd_writer = open(file, O_RDWR)) == -1) {
781 * Make sure file has all the correct data.
784 int fileokay(char *file, uchar_t * expbuf)
800 if ((fd = open64(file, O_RDONLY)) == -1) {
802 if ((fd = open(file, O_RDONLY)) == -1) {
841 * Okay if at last page in file...
882 /* finish nicely and check the file contents */