Line 0
Link Here
|
|
|
1 |
--- src/sthreads.c.orig Mon Jun 13 18:57:08 2005 |
2 |
+++ src/sthreads.c Mon Jun 13 19:17:04 2005 |
3 |
@@ -66,6 +66,15 @@ |
4 |
s_poll_wait(NULL, 0); /* wait on poll() */ |
5 |
} |
6 |
|
7 |
+/* |
8 |
+ * Reinitialize cleanup context to make it reusable |
9 |
+ * This is necessary at least on FreeBSD 5.4 |
10 |
+ */ |
11 |
+void rewind_ctx_cleanup(CONTEXT *ctx) { |
12 |
+ if (ctx->ctx.uc_link == &ctx_cleanup) |
13 |
+ makecontext(&ctx_cleanup, ctx_cleanup_func, 0); |
14 |
+} |
15 |
+ |
16 |
static CONTEXT *new_context(void) { |
17 |
CONTEXT *ctx; |
18 |
|