Index: tests/threads/newlib_stdio_test.c |
=================================================================== |
--- tests/threads/newlib_stdio_test.c (revision 0) |
+++ tests/threads/newlib_stdio_test.c (revision 0) |
@@ -0,0 +1,26 @@ |
+#include <pthread.h> |
+#include <stdio.h> |
+#include <unistd.h> |
+ |
+void *thr0(void* arg) { |
+ fopen("/tmp/z0", "w"); |
+ return 0; |
+} |
+ |
+void *thr1(void* arg) { |
+ usleep(500000); |
+ printf("success, %d\n", 1); |
+ return 0; |
+} |
+ |
+int main(int argc, char *argv[]) { |
+ pthread_t t0, t1; |
+ |
+ pthread_create(&t0, NULL, thr0, NULL); |
+ pthread_create(&t1, NULL, thr1, NULL); |
+ |
+ pthread_join(t0, NULL); |
+ pthread_join(t1, NULL); |
+ |
+ return 0; |
+} |