summaryrefslogtreecommitdiffstats
path: root/src/io-unix.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2010-03-10 13:58:39 +0200
committerTimo Teras <timo.teras@iki.fi>2010-03-10 13:58:39 +0200
commit5ef38570315dc68d7ddf8d9475d9a8830528e8a4 (patch)
treef88fc542b5231614ac6c22a75baea90d82449d6c /src/io-unix.c
parent43e69b26126b8708b70680c6b4806eb3844386ab (diff)
downloadlibtf-5ef38570315dc68d7ddf8d9475d9a8830528e8a4.tar.bz2
libtf-5ef38570315dc68d7ddf8d9475d9a8830528e8a4.tar.xz
libtf: separate scheduler fibre, change the core api
Diffstat (limited to 'src/io-unix.c')
-rw-r--r--src/io-unix.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/io-unix.c b/src/io-unix.c
index ea65a76..39cdf64 100644
--- a/src/io-unix.c
+++ b/src/io-unix.c
@@ -119,7 +119,7 @@ int tf_read_fully(struct tf_fd *fd, void *buf, size_t count)
continue;
}
- r = tf_schedule();
+ r = __tf_fiber_schedule();
} while (r == TF_WAKEUP_FD);
tf_fd_unmonitor(fd);
@@ -152,7 +152,7 @@ int tf_write_fully(struct tf_fd *fd, const void *buf, size_t count)
continue;
}
- r = tf_schedule();
+ r = __tf_fiber_schedule();
} while (r == TF_WAKEUP_FD);
tf_fd_unmonitor(fd);
@@ -174,7 +174,7 @@ ssize_t tf_read(struct tf_fd *fd, void *buf, size_t count)
n = -errno;
break;
}
- n = tf_schedule();
+ n = __tf_fiber_schedule();
} while (n == TF_WAKEUP_FD);
tf_fd_unmonitor(fd);
@@ -196,7 +196,7 @@ ssize_t tf_write(struct tf_fd *fd, const void *buf, size_t count)
n = -errno;
break;
}
- n = tf_schedule();
+ n = __tf_fiber_schedule();
} while (n == TF_WAKEUP_FD);
tf_fd_unmonitor(fd);
@@ -270,7 +270,7 @@ int tf_accept(struct tf_fd *listen_fd, struct tf_fd *child_fd,
tf_fd_unmonitor(listen_fd);
return -errno;
}
- r = tf_schedule();
+ r = __tf_fiber_schedule();
} while (r == TF_WAKEUP_FD);
tf_fd_unmonitor(listen_fd);
if (r < 0)
@@ -293,7 +293,7 @@ int tf_connect(struct tf_fd *fd, const struct tf_sockaddr *to)
/* Wait for socket to become readable */
tf_fd_monitor(fd, EPOLLOUT);
- r = tf_schedule();
+ r = __tf_fiber_schedule();
tf_fd_unmonitor(fd);
if (r != TF_WAKEUP_FD)
return r;
@@ -337,7 +337,7 @@ ssize_t tf_recvmsg(struct tf_fd *fd,
r = -errno;
break;
}
- r = tf_schedule();
+ r = __tf_fiber_schedule();
} while (r == TF_WAKEUP_FD);
tf_fd_unmonitor(fd);
@@ -400,7 +400,7 @@ ssize_t tf_sendmsg(struct tf_fd *fd,
r = -errno;
break;
}
- r = tf_schedule();
+ r = __tf_fiber_schedule();
} while (r == TF_WAKEUP_FD);
tf_fd_unmonitor(fd);