[commit: ghc] ghc-7.6: Change RTS hook APIs to match 7.6.1 (1eda0b7)

Ian Lynagh igloo at earth.li
Sat Jan 12 15:32:39 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.6

http://hackage.haskell.org/trac/ghc/changeset/1eda0b78a907e44c655f757448ec0499d494b328

>---------------------------------------------------------------

commit 1eda0b78a907e44c655f757448ec0499d494b328
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Jan 12 13:40:16 2013 +0000

    Change RTS hook APIs to match 7.6.1

>---------------------------------------------------------------

 ghc/hschooks.c            |    2 +-
 includes/rts/Hooks.h      |    6 +++---
 rts/hooks/MallocFail.c    |    2 +-
 rts/hooks/OutOfHeap.c     |    2 +-
 rts/hooks/StackOverflow.c |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ghc/hschooks.c b/ghc/hschooks.c
index fbcfda7..232ac08 100644
--- a/ghc/hschooks.c
+++ b/ghc/hschooks.c
@@ -32,7 +32,7 @@ defaultsHook (void)
 }
 
 void
-StackOverflowHook (StgWord stack_size)    /* in bytes */
+StackOverflowHook (lnat stack_size)    /* in bytes */
 {
     fprintf(stderr, "GHC stack-space overflow: current limit is %zu bytes.\nUse the `-K<size>' option to increase it.\n", (size_t)stack_size);
 }
diff --git a/includes/rts/Hooks.h b/includes/rts/Hooks.h
index f536afa..f409205 100644
--- a/includes/rts/Hooks.h
+++ b/includes/rts/Hooks.h
@@ -18,9 +18,9 @@ extern char *ghc_rts_opts;
 
 extern void OnExitHook (void);
 extern int  NoRunnableThreadsHook (void);
-extern void StackOverflowHook (W_ stack_size);
-extern void OutOfHeapHook (W_ request_size, W_ heap_size);
-extern void MallocFailHook (W_ request_size /* in bytes */, char *msg);
+extern void StackOverflowHook (lnat stack_size);
+extern void OutOfHeapHook (lnat request_size, lnat heap_size);
+extern void MallocFailHook (lnat request_size /* in bytes */, char *msg);
 extern void defaultsHook (void);
 
 #endif /* RTS_HOOKS_H */
diff --git a/rts/hooks/MallocFail.c b/rts/hooks/MallocFail.c
index 6c3a1a0..1987423 100644
--- a/rts/hooks/MallocFail.c
+++ b/rts/hooks/MallocFail.c
@@ -10,7 +10,7 @@
 #include <stdio.h>
 
 void
-MallocFailHook (W_ request_size /* in bytes */, char *msg)
+MallocFailHook (lnat request_size /* in bytes */, char *msg)
 {
     fprintf(stderr, "malloc: failed on request for %" FMT_Word " bytes; message: %s\n", request_size, msg);
 }
diff --git a/rts/hooks/OutOfHeap.c b/rts/hooks/OutOfHeap.c
index ec4697b..271c6a1 100644
--- a/rts/hooks/OutOfHeap.c
+++ b/rts/hooks/OutOfHeap.c
@@ -9,7 +9,7 @@
 #include <stdio.h>
 
 void
-OutOfHeapHook (W_ request_size, W_ heap_size) /* both sizes in bytes */
+OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */
 {
   /*    fprintf(stderr, "Heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse `+RTS -H<size>' to increase the total heap size.\n", */
 
diff --git a/rts/hooks/StackOverflow.c b/rts/hooks/StackOverflow.c
index 4072939..135e408 100644
--- a/rts/hooks/StackOverflow.c
+++ b/rts/hooks/StackOverflow.c
@@ -10,7 +10,7 @@
 #include <stdio.h>
 
 void
-StackOverflowHook (W_ stack_size)    /* in bytes */
+StackOverflowHook (lnat stack_size)    /* in bytes */
 {
     fprintf(stderr, "Stack space overflow: current size %" FMT_Word " bytes.\nUse `+RTS -Ksize -RTS' to increase it.\n", stack_size);
 }





More information about the ghc-commits mailing list