<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/5a33fdb5026d814fab8fb990d234a3b9"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-01T07:53:58"
  subject="Re: [Caml-list] enter/leave_blocking_section"
  prev="2003/07/a6c7433918c84295b55fdd0b2150eca7"
  next="2003/07/ab7f43fac15bf1a8c7a266580573ef09"
  prev-in-thread="2003/06/1e9b657c2353dc6b8d1db591722c560b"
  prev-thread="2003/06/b6775bb1ae2af6de0bc39d34733e3c0c"
  next-thread="2003/06/6d13391fb54ec8c407d72569fe790d7b"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] enter/leave_blocking_section">
<msg 
  url="2003/06/1e9b657c2353dc6b8d1db591722c560b"
  from="Fedorov Vsevolod &lt;sevaAtWork@m...&gt;"
  author="Fedorov Vsevolod"
  date="2003-06-27T12:31:07"
  subject="[Caml-list] enter/leave_blocking_section">
<msg 
  url="2003/07/5a33fdb5026d814fab8fb990d234a3b9"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-01T07:53:58"
  subject="Re: [Caml-list] enter/leave_blocking_section">
</msg>
</msg>
</thread>

<contents>
&gt; Is it safe to use enter_blocking_section() and leave_blocking_section()
&gt; calls from my C function like this:
&gt; 
&gt; void testSleep( value timev )
&gt; {
&gt;   CAMLparam1(timev);
&gt;   int time = Int_val(timev);
&gt;   enter_blocking_section();
&gt;   sleep(time);
&gt;   leave_blocking_section();
&gt;   CAMLreturn0;
&gt; }

Yes, that's the intended usage.

&gt; If yes, why are they not included in installed headers?

Oversight.  The development version now installs &lt;caml/signals.h&gt;
that declares {enter,leave}_blocking_section.

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

