summaryrefslogtreecommitdiffstats
path: root/src/fiber.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-12-01 13:55:43 +0200
committerTimo Teras <timo.teras@iki.fi>2009-12-01 13:55:43 +0200
commitffe17e686d99efc672b31e6876dcc4e30a05a572 (patch)
tree8facc066e3cf4da3fe0b2ab2ab4dc015318afc61 /src/fiber.c
parent959645020619f02d6ab8bb4026b0e0121b3971da (diff)
downloadlibtf-ffe17e686d99efc672b31e6876dcc4e30a05a572.tar.bz2
libtf-ffe17e686d99efc672b31e6876dcc4e30a05a572.tar.xz
libtf: optimize x86 fiber switching
by letting gcc figure out better how to represent stack pointers. also uses labels to make the code more readable.
Diffstat (limited to 'src/fiber.c')
-rw-r--r--src/fiber.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fiber.c b/src/fiber.c
index 6ddde1b..a7cb6bd 100644
--- a/src/fiber.c
+++ b/src/fiber.c
@@ -225,7 +225,7 @@ int tf_schedule(void)
if (unlikely(f->timeout_change)) {
if (f->timeout_change & TF_TIMEOUT_CHANGE_NEW_VALUE) {
if (tf_mtime_diff(f->timeout, tf_mtime()) <= 0) {
- f->timeout_change = TF_TIMEOUT_CHANGE;
+ f->timeout_change = TF_TIMEOUT_CHANGE_NEEDED;
return TF_WAKEUP_TIMEOUT;
}
tf_heap_change(&f->heap_node, &sched->heap, f->timeout);