scratch/ffiTest: removed export
[mate.git] / scratch / ffiTest / trapTest.hs
index 409c9a352938ee9e7cbd9af05ab377ed9cfbe82d..21e3719a55456488b0e3ccae90f1abc929f1fe21 100644 (file)
@@ -22,8 +22,6 @@ foreign import ccall "static sys/mman.h"
 foreign import ccall "static stdlib.h"
   memalign :: CUInt -> CUInt -> IO (Ptr a)
 
-foreign import ccall safe "prototypes.h"
-  registerSignalHandlers :: IO ()
 
 foreign import ccall "wrapper"
   wrap :: (CUInt -> Ptr SigInfo -> Ptr Context -> IO ()) -> IO (FunPtr (CUInt -> Ptr SigInfo -> Ptr Context -> IO ()))
@@ -31,9 +29,6 @@ foreign import ccall "wrapper"
 foreign import ccall "prototypes.h"
   registerSignalHandlers2 :: FunPtr (CUInt -> Ptr SigInfo -> Ptr Context -> IO ()) -> IO ()
 
-foreign export ccall
-    mateTrapHandler :: CUInt -> Ptr SigInfo -> Ptr Context -> CUInt -> IO ()
-
 type SigInfo = ()
 type Context = ()              
 
@@ -49,6 +44,7 @@ runMateKernel :: AppDomain -> IO ()
 runMateKernel _ = do    
   compileAndRun
 
+
 -- use FFI to unpack sigInfo and ctx....
 handler mateCtx signal sigInfo ctx = do 
   putStr "handler got me."
@@ -95,13 +91,3 @@ compileAndRun = do
 
 senseless :: IO Int
 senseless = getStdRandom (randomR (1,100))
-
-
-mateTrapHandler :: CUInt -> Ptr SigInfo -> Ptr Context -> CUInt -> IO ()
-mateTrapHandler signal sigInfo ctx eip = do
-  putStr "mateTrapHandler says: "
-  let eip' = (fromIntegral eip) :: Int
-  printf "source, eip: 0x%08x" eip'
-  print eip'
-
-