source:
mainline/uspace/lib/c/include/setjmp.h@
cb7be8f
| Last change on this file since cb7be8f was d7f7a4a, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 574 bytes | |
| Rev | Line | |
|---|---|---|
| [6cbed012] | 1 | /* |
| [d7f7a4a] | 2 | * SPDX-FileCopyrightText: 2018 CZ.NIC, z.s.p.o. |
| [6cbed012] | 3 | * |
| [d7f7a4a] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
| [6cbed012] | 5 | */ |
| 6 | ||
| [d2fa31f7] | 7 | /** @addtogroup libc |
| [6cbed012] | 8 | * @{ |
| 9 | */ | |
| 10 | ||
| [4805495] | 11 | #ifndef _LIBC_SETJMP_H_ |
| 12 | #define _LIBC_SETJMP_H_ | |
| [6cbed012] | 13 | |
| [a35a3d8] | 14 | #include <libarch/fibril_context.h> |
| [6b96dc06] | 15 | #include <_bits/__noreturn.h> |
| [bc56f30] | 16 | #include <_bits/decls.h> |
| 17 | ||
| 18 | __C_DECLS_BEGIN; | |
| [91e22dc] | 19 | |
| [a5c78a18] | 20 | typedef __context_t jmp_buf[1]; |
| [91e22dc] | 21 | |
| [b4f1171] | 22 | extern int __context_save(__context_t *) __attribute__((returns_twice)); |
| 23 | extern __noreturn void __context_restore(__context_t *, int); | |
| [6cbed012] | 24 | |
| [6b96dc06] | 25 | extern __noreturn void longjmp(jmp_buf, int); |
| [6cbed012] | 26 | |
| [bc56f30] | 27 | __C_DECLS_END; |
| 28 | ||
| 29 | #define setjmp __context_save | |
| [82fd245] | 30 | |
| [6cbed012] | 31 | #endif |
| 32 | ||
| 33 | /** @} | |
| 34 | */ |
Note:
See TracBrowser
for help on using the repository browser.
