From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p23Ncp7a004943 for ; Fri, 4 Mar 2011 00:38:51 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkBACe1b03RVdg2kGdsb2JhbACYYI1/CBUBAQEBCQkMBxEEIaNCiiWCHYUgL4hbAQEDBYVcBIUUhxiGWoF9Og X-IronPort-AV: E=Sophos;i="4.62,261,1297033200"; d="scan'208";a="101220416" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 04 Mar 2011 00:38:45 +0100 Received: by qwj8 with SMTP id 8so1819164qwj.27 for ; Thu, 03 Mar 2011 15:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=gIN44dHQtPiSBUldyjrOojUWmNgwZlwdwuJ9bxi88Fk=; b=RhE8WIyViK4WNIaaeqfIMPSzn1glg6AncS6NjydNY+xrVwfvNbslUr+XLdOrMQVIDp hutEftnRxJdWLjIU7pFQEhTeuzGxqz3pcBarJ2kA5dtZhYLRo/tAyK3mz4F0Ep3VSgJj T+xG+wAdvB4XjDo8VkQa/crkT5x+dSNhQSUjo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XmLM+S9Kjzun318yuh04mcPxhaLF7tBzIdRX/j+I9CWtK5vouO17gpRJPflDKTwCml UxSfBIGDfd0DBckute1Y2SITsVKwNL8Q/ITYXLodyav+uqIAJPLcEYdt/+wtWuRt0EiN IV//q1v+q51LnjHTVyJcXygLjBhAbUn7y0Iu4= MIME-Version: 1.0 Received: by 10.229.91.2 with SMTP id k2mr1482850qcm.260.1299195524461; Thu, 03 Mar 2011 15:38:44 -0800 (PST) Received: by 10.229.96.136 with HTTP; Thu, 3 Mar 2011 15:38:44 -0800 (PST) In-Reply-To: References: Date: Fri, 4 Mar 2011 02:38:44 +0300 Message-ID: From: Dmitry Bely To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Using C threads On Fri, Mar 4, 2011 at 2:23 AM, Niki Yoshiuchi wrote: > Yes, I have (you can't use caml_c_thread_register() without it). > However it appears that the flag doesn't run the code in the module. If you link your program as described in the manual: ocamlc -thread other options unix.cma threads.cma other files ocamlopt -thread other options unix.cmxa threads.cmxa other files Thread.thread_initialize should be called automatically by ocaml runtime during startup. If it's not called, something is broken in your system. Do you have the main program in Ocaml? If not, do you call caml_startup() from your C code? - Dmitry Bely