1. 19 Sep, 2010 1 commit
    • Edward Z. Yang's avatar
      Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4 · 83d563cb
      Edward Z. Yang authored
      This is patch that adds support for interruptible FFI calls in the form
      of a new foreign import keyword 'interruptible', which can be used
      instead of 'safe' or 'unsafe'.  Interruptible FFI calls act like safe
      FFI calls, except that the worker thread they run on may be interrupted.
      
      Internally, it replaces BlockedOnCCall_NoUnblockEx with
      BlockedOnCCall_Interruptible, and changes the behavior of the RTS
      to not modify the TSO_ flags on the event of an FFI call from
      a thread that was interruptible.  It also modifies the bytecode
      format for foreign call, adding an extra Word16 to indicate
      interruptibility.
      
      The semantics of interruption vary from platform to platform, but the
      intent is that any blocking system calls are aborted with an error code.
      This is most useful for making function calls to system library
      functions that support interrupting.  There is no support for pre-Vista
      Windows.
      
      There is a partner testsuite patch which adds several tests for this
      functionality.
      83d563cb
  2. 08 Jul, 2010 1 commit
  3. 23 Feb, 2010 1 commit
  4. 02 Oct, 2009 1 commit
  5. 04 Jul, 2009 1 commit
  6. 02 Jun, 2009 1 commit
  7. 09 Dec, 2008 1 commit
  8. 15 Jul, 2008 1 commit
  9. 16 Jun, 2008 1 commit
    • Ian Lynagh's avatar
      More commandline flag improvements · 0f5e104c
      Ian Lynagh authored
      * Allow -ffoo flags to be deprecated
      * Mark some -ffoo flags as deprecated
      * Avoid using deprecated flags in error messages, in the build system, etc
      * Add a flag to en/disable the deprecated flag warning
      0f5e104c
  10. 26 Nov, 2007 1 commit
  11. 07 Oct, 2007 1 commit
  12. 26 Jul, 2007 1 commit
    • Simon Marlow's avatar
      Documentation updates for #1177 · ded67816
      Simon Marlow authored
      We now have a section that describes what hs_exit() does (including
      the "wait for foreign calls to return" behaviour), and more
      documentation on creating libraries of Haskell code.  I also imported
      the section "Beware of DllMain()!" from the haskell.org wiki, with
      some minor editing.
      ded67816
  13. 20 Feb, 2007 1 commit
  14. 07 Feb, 2007 1 commit
  15. 04 Sep, 2006 1 commit
  16. 14 Apr, 2006 1 commit
  17. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  18. 28 Oct, 2005 1 commit
  19. 19 Jan, 2005 1 commit
  20. 03 Oct, 2004 1 commit
  21. 15 Aug, 2004 1 commit
    • panne's avatar
      [project @ 2004-08-15 20:37:22 by panne] · b9de29ac
      panne authored
      Started to convert the users guide to DocBook XML. Not yet finished, there are
      still *tons* of misplaced indexterms, but some sensible documentation can
      already be generated.
      b9de29ac
  22. 08 Aug, 2004 2 commits
  23. 05 May, 2004 1 commit
  24. 23 Jun, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-06-23 10:35:15 by simonpj] · d28ba8c8
      simonpj authored
      -------------------
      	Dealing with 'main'
      	-------------------
      
      1.  In GHC 6.0, a module with no "module Main ... where" header
          elicited an error "main is not in scope" if 'main' is not defined.  We
          don't want this behaviour in GHCi.  This happened because the parser
          expanded the (absent) header to "module Main( main ) where", and the
          'main' in the export list isn't.
      
      Solution: elaborate HsModule to record whether the 'module ..." header was
      given explicitly by the user or not.
      
      
      2.  Add a -main-is flag, and document it, so that you can have a 'main' function
      that is not Main.main.  Summary of changes
      
      * The -main-is flag nominates what the main function is to be (see the documentation).
      	No -main-is flag 	says that the main function is Main.main
      	-main-is Foo.baz	says that the main function is Foo.baz
      	-main-is Foo		says that the main function is Foo.main
      	-main-is baz		says that the main function is Main.baz
      
        Let's say  you say -main-is Foo.baz
      
      * TcRnDriver injects the extra definition
      	$Mian.main :: IO t
      	$Main.main = baz
        in the module Foo.   Note the naming, which is a bit different than before;
        previously the extra defn was for Main.$main.  The RTS invokes zdMain_main_closure.
      
      * CodeGen injects an extra initialisation block into module Foo, thus
      	stginit_zdMain {
      		stginit_Foo
      	}
        That ensures that the RTS can initialise stginit_zdMain.
      d28ba8c8
  25. 14 Apr, 2003 1 commit
  26. 11 Mar, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-03-11 10:34:58 by simonmar] · de26eb1b
      simonmar authored
      - Remove mention of MutableByteArray and ByteArray
      
      - Add section on memory allocation in the FFI, with emphasis on how
        GHC's implementations of the various kinds of allocation perform.
      de26eb1b
  27. 28 Jan, 2003 1 commit
  28. 13 Jan, 2003 2 commits
    • simonpj's avatar
      [project @ 2003-01-13 13:39:34 by simonpj] · a7c1d388
      simonpj authored
      wibble
      a7c1d388
    • simonpj's avatar
      [project @ 2003-01-13 13:20:37 by simonpj] · 90bf3139
      simonpj authored
      --------------------------------
      	Don't export the inlining for a foreign
      	import that has a #include directive
      	--------------------------------
      
      Reason for this change: if the inlining is imported into another
      module, the latter may not have the right #include directives.
      
      Also add notes to the documentation to explain the issues.
      90bf3139
  29. 25 Jun, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-06-25 12:05:14 by simonmar] · 7bcdfdba
      simonmar authored
      Various hacking on the User's Guide to knock it into shape for the release.
      
      Committers: please take a look at the 5.04 release notes and feel free
      to tweak or embelish the description for your favourite new feature.
      7bcdfdba
  30. 15 May, 2002 1 commit
    • chak's avatar
      [project @ 2002-05-15 08:59:58 by chak] · de1d4a16
      chak authored
      * Added the options `-ffi' and `-fffi', which switch on FFI support
        (`-fglasgow-exts' implies `-fffi').
      
        NB: Strictly speaking `-fffi' is the correct name; however, `-ffi' is
            supported as an alternative spelling.
      
      * `-fglasgow-exts' no longer enables the `with' keyword for implicit
        parameters.  To use `with' as a keyword, the additional option `-fwith' has
        to be supplied.  (Note that SimonM recently enabled the use of `let' instead
        of `with'.)
      
        NB: This might prompt some makefile tweaks in libraries or regression tests.
      
      * Renamed `Foreign.Marshal.Utils.withObject' to `Foreign.Marshal.Utils.with'
        as required by the FFI Addendum.  (The old name is still available, but
        marked as deprecated.)
      
      * Added `realloc' to `Foreign.Marshal.Alloc' (tracking RC4 of the FFI
        Addendum).
      
      Docu
      ~~~~
      * Added `-ffi', `-fffi', and `-fwith' to the flag reference and the section
        describing options for Glasgow extensions
      
      * Removed most of the FFI section in the User's Guide in favour of a reference
        to the Addendum plus a brief description of additional features supported by
        GHC.
      
        NB: The old material is still available at fptools/docs/, I merely removed
        the reference in the User's Guide.
      de1d4a16
  31. 04 Jan, 2002 1 commit
  32. 25 Sep, 2001 1 commit
  33. 17 Sep, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-09-17 09:51:23 by simonmar] · 488d5cc3
      simonmar authored
      Knock the FFI documentation into some sort of shape for the release:
      
      - The blurb about "the FFI is in two/three parts..." was repeated in
        three places.  We also at some point seem to have lost the property
        that the FFI spec is a self-contained document; I don't try to fix
        that here, since we're going to replace it with the new spec at some
        point.
      
      - Replace references to Addr and ForeignObj with Ptr and ForeignPtr.
      
      - Remove mentions of GHC's ByteArray and MutableByteArray types, as
        these are deprecated and will be removed in a couple of versions.
        (mostly subsumed by allocaBytes and friends).
      
      - Catch up with GHC's removal of the library specification from foreign
        import.  Mention that libraries are specified in a compiler-dependent
        way now, and that GHC uses either packages or command-line opts for
        this.
      
      - Fix up some markup.
      488d5cc3
  34. 14 Sep, 2001 1 commit
  35. 08 Aug, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-08-08 13:19:07 by simonmar] · 14d65c3f
      simonmar authored
      - Rearrange the FFI documentation: put it all in chapter 8.
      
      - Add a section "Using the FFI with GHC", and add some information about
        the stub files generated by GHC for foreign export dynamic.
      14d65c3f
  36. 08 Jun, 2000 2 commits