Turn context_save/context_restore into standard setjmp/longjmp. (#24)
Turn `context_save()`/`context_restore()` into semi-standard `__setjmp()`/`__longjmp()`.
The original `context_*` functions are similar to `setjmp()`/`longjmp()`, except that the return value is more restricted for the former, and with inverted meaning. This commit adopts the standard return value semantics and acknowledges that these functions are "standard `setjmp()`/`longjmp()` with additional implementation-specific properties" by changing the name. The only divergence from the standard is that `__longjmp()` causes `__setjmp()` to return its value unchanged, even if it is zero. This is just to avoid extra assembly, and `longjmp()` checks this in C.
Note that the original use of `context_save()`/`context_restore()` to implement context switching in fibril implementation has already been delegated to `context_create()`/`context_swap()`, which provide more natural control flow.
14 files changed: