delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Subject: | Re: Thread support in cygwin! |
From: | Joost Kraaijeveld <J DOT Kraaijeveld AT Askesis DOT nl> |
To: | Do Nguyen Luong <do_luong87 AT yahoo DOT com> |
Cc: | cygwin AT cygwin DOT com |
In-Reply-To: | <3894619.post@talk.nabble.com> |
References: | <3894619 DOT post AT talk DOT nabble DOT com> |
Date: | Thu, 13 Apr 2006 08:10:15 +0200 |
Message-Id: | <1144908615.22144.6.camel@localhost> |
Mime-Version: | 1.0 |
X-Mailer: | Evolution 2.4.2.1 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Wed, 2006-04-12 at 21:53 -0700, Do Nguyen Luong wrote: > #include <pthread.h> > #include <unistd.h> > #include <stdio.h> > int main() > { > #ifdef _POSIX_THREADS > printf("sysconf(_SC_THREADS): %d\n", sysconf(_SC_THREADS)); > #else > printf("_POSIX_THREADS not defined\n"); > #endif > return 0; > } > > And I get : > sysconf(_SC_THREADS): -1 > > Is that mean cygwin doesn't support threads? Or I missed some package? No, it means that _POSIX_THREADS is not defined. For the pthread support of Cygwin you can look at Cygwin's pthread.h (which basically says that this is implemented: http://www.opengroup.org/onlinepubs/7908799/xsh/pthread.h.html ) or at the Cygwin API docs at http://cygwin.com/cygwin-api/std-posix.html#AEN85 (which seems a little sparse). -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |