Changeset 615e83d in mainline for uspace/lib/c/generic/context.c
- Timestamp:
- 2018-03-08T18:25:31Z (7 years ago)
- Children:
- 55f068c
- Parents:
- e0a4686
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-08 17:43:06)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-08 18:25:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/context.c
re0a4686 r615e83d 28 28 29 29 #include <context.h> 30 #include <setjmp.h> 30 31 #include <libarch/tls.h> 31 32 #include <libarch/fibril.h> … … 42 43 void context_swap(context_t *self, context_t *other) 43 44 { 44 if ( context_save(self))45 context_restore(other);45 if (!setjmp(self)) 46 __longjmp(other, 1); 46 47 } 47 48 48 49 void context_create(context_t *context, const context_create_t *arg) 49 50 { 50 context_save(context);51 setjmp(context); 51 52 context_set(context, FADDR(arg->fn), arg->stack_base, 52 53 arg->stack_size, arg->tls);
Note:
See TracChangeset
for help on using the changeset viewer.