Changeset a35a3d8 in mainline for uspace/lib/c/generic/context.c
- Timestamp:
- 2018-03-12T17:13:46Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b127e4af
- Parents:
- f3d47c97
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-12 17:13:46)
- git-committer:
- GitHub <noreply@…> (2018-03-12 17:13:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/context.c
rf3d47c97 ra35a3d8 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.