caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Threading and C code
@ 2001-06-14 18:36 David McClain
  2001-06-18  9:43 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: David McClain @ 2001-06-14 18:36 UTC (permalink / raw)
  To: caml-list

Hi,

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: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Threading and C code
  2001-06-14 18:36 [Caml-list] Threading and C code David McClain
@ 2001-06-18  9:43 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-06-18  9:43 UTC (permalink / raw)
  To: David McClain; +Cc: caml-list

> 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.

This is correct.

> 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?

This protocol hasn't changed in many years, so I agree it should be
documented.

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-06-18  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-14 18:36 [Caml-list] Threading and C code David McClain
2001-06-18  9:43 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).