Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Threading and C code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-14 (18:36)
From: David McClain <dmcclain1@m...>
Subject: [Caml-list] Threading and C code

I just wrote an bunch of C primitives to attach to an OCamlopt project, and
some of these wait on internal semaphores, events, and mutexes. It appeared
to me that these shut down the OCaml native threading system on Windows
(98SE and NT/4.0).

After searching through the sources for the threads lib I find that two
entry points are used to negotiate this possibility --
enter_blocking_section() and leave_blocking_section().  These appear to be
needed around any code that could possibly block.

These aren't mentioned in any of the normal header files in /ocaml/lib/caml
but I think they ought to be. Is this protocol subject to change? or can it
be made a standard protocol for C external functions?

- DM

Bug reports:  FAQ:
To unsubscribe, mail  Archives: