English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Wrapping C code using pthread.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-12-27 (09:43)
From: ygrek <ygrekheretix@g...>
Subject: Re: [Caml-list] Wrapping C code using pthread.
On Fri, 25 Dec 2009 21:57:21 +0100
Guillaume Yziquel <guillaume.yziquel@citycable.ch> wrote:

> Hello.
> I'm currently trying to wrap up together a C interface for the MonetDB5 
> database system. I'm getting quite a lot of segfaults (a lot of which 
> come from MonetDB itself), and I'm therefore wondering the following 
> about pthreads and OCaml:
> The server is started via a pthread:
> pthread_create(&sqlthread, NULL, start_sql_server, (void *) server);
> and I would like to know what kind of things I should look at with 
> C-side pthreads in order to avoid segfaults...

How does the OCaml code gets executed? Via callbacks from this thread?
If so, have a look at http://caml.inria.fr/mantis/view.php?id=4702