haiku/headers/posix/setjmp.h
Ingo Weinhold 2222d0559d * Introduced new header directory "config", which ATM contains HaikuConfig.h
and types.h. The idea is to provide a basic architecture/compiler
  abstraction by defining types and macros that allow the posix/ and os/
  headers to be mostly architecture/compiler agnostic. 
* Adjusted the posix/ and os/ headers accordingly.
* <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI*
  and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int*
  types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX
  macros. Also the B_PRI* and B_SCN* macros are available unconditionally,
  unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be
  defined in C++ mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 19:44:07 +00:00

42 lines
860 B
C

/*
* Copyright 2004-2009, Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _SETJMP_H_
#define _SETJMP_H_
#include <config/HaikuConfig.h>
#include <signal.h>
/* include architecture specific definitions */
#include __HAIKU_ARCH_HEADER(arch_setjmp.h)
typedef struct __jmp_buf_tag {
__jmp_buf regs; /* saved registers, stack & program pointer */
int mask_was_saved;
sigset_t saved_mask;
} jmp_buf[1];
typedef jmp_buf sigjmp_buf;
#ifdef __cplusplus
extern "C" {
#endif
extern int _setjmp(jmp_buf jumpBuffer);
extern int setjmp(jmp_buf jumpBuffer);
extern int sigsetjmp(jmp_buf jumpBuffer, int saveMask);
extern void _longjmp(jmp_buf jumpBuffer, int value);
extern void longjmp(jmp_buf jumpBuffer, int value);
extern void siglongjmp(sigjmp_buf jumpBuffer, int value);
#ifdef __cplusplus
}
#endif
#endif /* _SETJMP_H_ */