From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 0EBBDBBAF for ; Fri, 25 Dec 2009 21:57:31 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQDAGK2NEtV2gB5h2dsb2JhbACDapUjgkYBAQEKCwgHFaokjiGBL4IuVgSJJQ X-IronPort-AV: E=Sophos;i="4.47,455,1257116400"; d="scan'208";a="39330128" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail2-smtp-roc.national.inria.fr with SMTP; 25 Dec 2009 21:57:26 +0100 Received: from [192.168.1.100] (unknown [92.102.140.132]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 5426DB10401; Fri, 25 Dec 2009 21:57:22 +0100 (CET) Message-ID: <4B352731.2060306@citycable.ch> Date: Fri, 25 Dec 2009 21:57:21 +0100 From: Guillaume Yziquel Reply-To: guillaume.yziquel@citycable.ch User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: OCaml List Subject: Wrapping C code using pthread. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; guillaume:01 guillaume:01 segfaults:01 ocaml:01 segfaults:01 pthreads:02 pthreads:02 null:05 interface:06 void:06 pthread:07 pthread:07 quite:08 wrap:08 i'm:09 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... All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/