Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/context.c

    ra35a3d8 re0a4686  
    2828
    2929#include <context.h>
    30 #include <setjmp.h>
    3130#include <libarch/tls.h>
    3231#include <libarch/fibril.h>
     
    4342void context_swap(context_t *self, context_t *other)
    4443{
    45         if (!__setjmp(self))
    46                 __longjmp(other, 1);
     44        if (context_save(self))
     45                context_restore(other);
    4746}
    4847
    4948void context_create(context_t *context, const context_create_t *arg)
    5049{
    51         __setjmp(context);
     50        context_save(context);
    5251        context_set(context, FADDR(arg->fn), arg->stack_base,
    5352            arg->stack_size, arg->tls);
Note: See TracChangeset for help on using the changeset viewer.