diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-06-03 18:31:28 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-06-03 18:31:28 -0700 |
commit | 888bc6cc1dbe9433d512224043391d6d051f2b80 (patch) | |
tree | 4b0ed8ba0bb39df6b70454990fa90062f129829f /src/pulp.c | |
parent | ca5fb8580b828f2378102ecd8846063fe7b47177 (diff) |
libpulp: remove now unused enter_context()
Diffstat (limited to 'src/pulp.c')
-rw-r--r-- | src/pulp.c | 23 |
1 files changed, 3 insertions, 20 deletions
@@ -162,15 +162,6 @@ static inline void set_current_fiber(pulp_t *pulp, list_head_t *head) #ifdef __WIN32__ -/* sets the supplied context as the executing context */ -static void enter_context(pulp_context_t *context) -{ - assert(context); - - SwitchToFiber(context->win32_fiber); -} - - /* win32 fibers can't return or the program exits, so their functions need to * run from a trampoline function, and there's only one pointer supplied so now * I need the fiber's thunk saved in the fiber structure, and I find the fiber @@ -187,7 +178,8 @@ static void win32_trampoline(void *ptr) assert(pulp->current->thunk); (void) thunk_dispatch(pulp->current->thunk); - enter_context(&pulp->trampoline_context); + + SwitchToFiber(pulp->trampoline_context.win32_fiber); } @@ -217,7 +209,7 @@ static void swap_context(pulp_context_t *old, pulp_context_t *new) if (old == new) return; - enter_context(new); + SwitchToFiber(new->win32_fiber); } @@ -246,15 +238,6 @@ static void setup_context(pulp_t *pulp, pulp_context_t *context, void *func, voi } -/* sets the supplied context as the executing context */ -static void enter_context(pulp_context_t *context) -{ - assert(context); - - setcontext(&context->ucontext); -} - - /* swaps the new supplied context with the executing context */ /* the current context is saved in old */ static void swap_context(pulp_context_t *old, pulp_context_t *new) |