X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fos.h;h=c8e0f52d306345ac91d2a57d3dffe913e98e3764;hb=7514ed33d21318edb5d28ab0f4afc23625fd3530;hp=049b248c5b016fe59e050cac153300202b071889;hpb=9ebc54b8a67b4112e7978493d1d588b3f4e3069b;p=u-boot diff --git a/include/os.h b/include/os.h index 049b248c5b..c8e0f52d30 100644 --- a/include/os.h +++ b/include/os.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Operating System Interface * @@ -5,7 +6,6 @@ * They are kept in a separate file so we can include system headers. * * Copyright (c) 2011 The Chromium OS Authors. - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __OS_H__ @@ -330,4 +330,25 @@ int os_spl_to_uboot(const char *fname); */ void os_localtime(struct rtc_time *rt); +/** + * os_setjmp() - Call setjmp() + * + * Call the host system's setjmp() function. + * + * @jmp: Buffer to store current execution state + * @size: Size of buffer + * @return normal setjmp() value if OK, -ENOSPC if @size is too small + */ +int os_setjmp(ulong *jmp, int size); + +/** + * os_longjmp() - Call longjmp() + * + * Call the host system's longjmp() function. + * + * @jmp: Buffer where previous execution state was stored + * @ret: Value to pass to longjmp() + */ +void os_longjmp(ulong *jmp, int ret); + #endif