diff options
author | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
commit | 6f82d0e8f9756938f04071892206a5af85e676f0 (patch) | |
tree | 821921a1dd0a5a3cece91121e121cc63c4b68128 /src/regress/lib/libc/stdio_threading/fopen | |
parent | 9204e59073bcf27e1487ec4ac46e981902ddd904 (diff) | |
download | openbsd-eric_g2k12.tar.gz openbsd-eric_g2k12.tar.bz2 openbsd-eric_g2k12.zip |
This commit was manufactured by cvs2git to create tag 'eric_g2k12'.eric_g2k12
Diffstat (limited to 'src/regress/lib/libc/stdio_threading/fopen')
-rw-r--r-- | src/regress/lib/libc/stdio_threading/fopen/Makefile | 6 | ||||
-rwxr-xr-x | src/regress/lib/libc/stdio_threading/fopen/fopen_test.c | 48 |
2 files changed, 0 insertions, 54 deletions
diff --git a/src/regress/lib/libc/stdio_threading/fopen/Makefile b/src/regress/lib/libc/stdio_threading/fopen/Makefile deleted file mode 100644 index e51deeff1d..0000000000 --- a/src/regress/lib/libc/stdio_threading/fopen/Makefile +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | TOPDIR=${.CURDIR} | ||
2 | PROG=fopen_test | ||
3 | CFLAGS+=-I${TOPDIR}/../include/ | ||
4 | LDFLAGS+=-lpthread | ||
5 | |||
6 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libc/stdio_threading/fopen/fopen_test.c b/src/regress/lib/libc/stdio_threading/fopen/fopen_test.c deleted file mode 100755 index 72359bb323..0000000000 --- a/src/regress/lib/libc/stdio_threading/fopen/fopen_test.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2008 Bret S. Lambert <blambert@openbsd.org> | ||
3 | * | ||
4 | * Permission to use, copy, modify, and distribute this software for any | ||
5 | * purpose with or without fee is hereby granted, provided that the above | ||
6 | * copyright notice and this permission notice appear in all copies. | ||
7 | * | ||
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | */ | ||
16 | |||
17 | #include <stdio.h> | ||
18 | #include <pthread.h> | ||
19 | #include "local.h" | ||
20 | |||
21 | int | ||
22 | writefn(void *cookie, const char *buf, int size) | ||
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | void | ||
28 | fopen_thread(void *v) | ||
29 | { | ||
30 | FILE *file; | ||
31 | int i; | ||
32 | |||
33 | for (i = 0; i < 4096; i++) { | ||
34 | file = fwopen(&i, writefn); | ||
35 | if (file != NULL) { | ||
36 | fputc('0', file); | ||
37 | pthread_yield(); | ||
38 | fclose(file); | ||
39 | } | ||
40 | } | ||
41 | } | ||
42 | |||
43 | int | ||
44 | main(void) | ||
45 | { | ||
46 | run_threads(fopen_thread, NULL); | ||
47 | exit(0); | ||
48 | } | ||