diff options
author | Rickard Green <[email protected]> | 2012-08-20 13:48:29 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-12-03 21:18:08 +0100 |
commit | 56cef897ca3ad2377e34a6ea5800a54a28cbeb6e (patch) | |
tree | 0cbb2eba5b3de84cc8d22577af454f4ac2f38885 /erts/emulator/beam/sys.h | |
parent | 7e789df8dd9c7d86e9cc354521a37aa598aa5ec8 (diff) | |
download | otp-56cef897ca3ad2377e34a6ea5800a54a28cbeb6e.tar.gz otp-56cef897ca3ad2377e34a6ea5800a54a28cbeb6e.tar.bz2 otp-56cef897ca3ad2377e34a6ea5800a54a28cbeb6e.zip |
Optimize management of port tasks
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r-- | erts/emulator/beam/sys.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h index 12313f0984..fd6f34e96e 100644 --- a/erts/emulator/beam/sys.h +++ b/erts/emulator/beam/sys.h @@ -123,6 +123,16 @@ typedef ERTS_SYS_FD_TYPE ErtsSysFdType; # define ERTS_DECLARE_DUMMY(X) X #endif +#if !defined(__func__) +# if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L +# if !defined(__GNUC__) || __GNUC__ < 2 +# define __func__ "[unknown_function]" +# else +# define __func__ __FUNCTION__ +# endif +# endif +#endif + #if defined(DEBUG) || defined(ERTS_ENABLE_LOCK_CHECK) # undef ERTS_CAN_INLINE # define ERTS_CAN_INLINE 0 @@ -553,6 +563,10 @@ __decl_noreturn void __noreturn erl_exit(int n, char*, ...); #define ERTS_ABORT_EXIT (INT_MIN + 1) /* no crash dump; only abort() */ #define ERTS_DUMP_EXIT (INT_MIN + 2) /* crash dump; then exit() */ +#define ERTS_INTERNAL_ERROR(What) \ + erl_exit(ERTS_ABORT_EXIT, "%s:%d:%s(): Internal error: %s", \ + __FILE__, __LINE__, __func__, What) + Eterm erts_check_io_info(void *p); /* Size of misc memory allocated from system dependent code */ |