summaryrefslogtreecommitdiffstats
path: root/test/read.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-11-25 15:11:20 +0200
committerTimo Teras <timo.teras@iki.fi>2009-11-25 15:11:20 +0200
commit2b19cc385163a43b1d559074a795a8aaab751185 (patch)
tree322473e3446153c1bbaac8d6d990734b09d15977 /test/read.c
parentfc1044daf51f32b9d85f8497e4e0bd5a3c1e7fe9 (diff)
downloadlibtf-2b19cc385163a43b1d559074a795a8aaab751185.tar.bz2
libtf-2b19cc385163a43b1d559074a795a8aaab751185.tar.xz
libtf: implement basic networking i/o
pretty much untested. also some slight changes to how scheduler is invoked.
Diffstat (limited to 'test/read.c')
-rw-r--r--test/read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/read.c b/test/read.c
index 1921609..97f25fd 100644
--- a/test/read.c
+++ b/test/read.c
@@ -22,9 +22,9 @@ static void io_fiber(void *ptr)
char data[8];
struct tf_fd fin;
- tf_open_fd(&fin, STDIN_FILENO);
+ tf_open_fd(&fin, STDIN_FILENO, TF_FD_STREAM_ORIENTED);
while (1) {
- if (tf_read(&fin, data, sizeof(data), TF_INFINITE) < 0)
+ if (tf_read(&fin, data, sizeof(data), TF_NO_TIMEOUT) < 0)
break;
printf("Read: %8.8s\n", data);
}