Terminate program if execPage fails, this is more honest and
simplifies things a bit.
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Rts.h,v 1.25 2004/08/21 12:47:17 panne Exp $
+ * $Id: Rts.h,v 1.26 2004/08/22 16:40:38 panne Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* (c) The GHC Team, 1998-1999
*
#endif
/* Initialising the whole adjustor thunk machinery. */
#endif
/* Initialising the whole adjustor thunk machinery. */
-extern rtsBool initAdjustor(void);
+extern void initAdjustor(void);
extern void stg_exit(int n) GNU_ATTRIBUTE(__noreturn__);
extern void stg_exit(int n) GNU_ATTRIBUTE(__noreturn__);
* TODO: Can the code span more than one page? If yes, we need to make two
* pages executable!
*/
* TODO: Can the code span more than one page? If yes, we need to make two
* pages executable!
*/
execPage (void* addr, pageMode mode)
{
#if defined(i386_TARGET_ARCH) && defined(_WIN32) && 0
execPage (void* addr, pageMode mode)
{
#if defined(i386_TARGET_ARCH) && defined(_WIN32) && 0
sInfo.dwPageSize,
( mode == pageExecuteReadWrite ? PAGE_EXECUTE_READWRITE : PAGE_EXECUTE_READ),
&dwOldProtect) == 0 ) {
sInfo.dwPageSize,
( mode == pageExecuteReadWrite ? PAGE_EXECUTE_READWRITE : PAGE_EXECUTE_READ),
&dwOldProtect) == 0 ) {
DWORD rc = GetLastError();
DWORD rc = GetLastError();
- prog_belch("execPage: failed to protect 0x%p; error=%lu; old protection: %lu\n", addr, rc, dwOldProtect);
-# endif
- return rtsFalse;
+ barf("execPage: failed to protect 0x%p; error=%lu; old protection: %lu\n", addr, rc, dwOldProtect);
#else
(void)addr; (void)mode; /* keep gcc -Wall happy */
#else
(void)addr; (void)mode; /* keep gcc -Wall happy */
*
* Perform initialisation of adjustor thunk layer (if needed.)
*/
*
* Perform initialisation of adjustor thunk layer (if needed.)
*/
initAdjustor(void)
{
#if defined(i386_TARGET_ARCH)
initAdjustor(void)
{
#if defined(i386_TARGET_ARCH)
execPage(obscure_ccall_ret_code, pageExecuteRead);
#endif
execPage(obscure_ccall_ret_code, pageExecuteRead);
#endif