Changeset 91e22dc in mainline for uspace/lib/c/generic/setjmp.c
- Timestamp:
- 2013-11-15T08:39:36Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6a5b999
- Parents:
- 8797bae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/setjmp.c
r8797bae r91e22dc 40 40 #include <fibril.h> 41 41 42 struct jmp_buf_interal {43 context_t context;44 int return_value;45 };46 47 /**48 * Save current environment (registers).49 *50 * This function may return twice.51 *52 * @param env Variable where to save the environment.53 * @return Whether the call returned after longjmp.54 * @retval 0 Environment was saved, normal execution.55 * @retval other longjmp was executed and returned here.56 */57 int setjmp(jmp_buf env) {58 env->return_value = 0;59 context_save(&env[0].context);60 return env->return_value;61 }62 63 42 /** 64 43 * Restore environment previously stored by setjmp.
Note:
See TracChangeset
for help on using the changeset viewer.