Le lundi 4 octobre 2010 13:37:11, Romain Beauxis a écrit :
> This is very likely to be relevant for some of our bindings, in particular
> ocaml-jack, which we were never able to fix.
I've applied the attached patch to ocaml-jack and am running a test now.
Sam: do you think this is likely to solve our deadlock with jack ?
The reason I'm interested is that ocaml-jack is perhaps a better solution than
ocaml-bjack. Even if I've spent quite some time on ocaml-bjack, I'd be happy
to throw it if we could fix ocaml-jack..
Romain
Index: jack_stubs.c
===================================================================
--- jack_stubs.c (révision 7697)
+++ jack_stubs.c (copie de travail)
@@ -8,6 +8,7 @@
#include <caml/misc.h>
#include <caml/mlvalues.h>
#include <caml/signals.h>
+#include <caml/threads.h>
#include <stdio.h>
#include <string.h>
@@ -430,6 +431,7 @@
static void* poll_for_callback(void *arg)
{
caml_client_t *cc = (caml_client_t*)arg;
+ caml_c_thread_register();
pthread_mutex_lock(cc->buffer_mutex);
while(1)
@@ -442,6 +444,9 @@
caml_callback(*caml_named_value("caml_mutex_lock"), cc->caml_buffer_mutex);
}
pthread_mutex_unlock(cc->buffer_mutex);
+
+ caml_c_thread_unregister();
+ return NULL;
}
CAMLprim value ocaml_jack_client_new(value name)
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl