// Safefetch allows to load a value from a location that's not known // to be valid. If the load causes a fault, the error value is returned.
#ifdef _WIN32 // Windows uses Structured Exception Handling #include"safefetch_windows.hpp" #elifdefined(ZERO) || defined (_AIX) // These platforms implement safefetch via Posix sigsetjmp/longjmp. // This is slower than the other methods and uses more thread stack, // but its safe and portable. #include"safefetch_sigjmp.hpp" #define SAFEFETCH_METHOD_SIGSETJMP #else // All other platforms use static assembly #include"safefetch_static.hpp" #define SAFEFETCH_METHOD_STATIC_ASSEMBLY #endif
inlineint SafeFetch32(int* adr, int errValue) { return SafeFetch32_impl(adr, errValue);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.