Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Message-ID: <009b01c0b05a$3cd4fb30$0200a8c0@lifelesswks> From: "Robert Collins" To: Subject: pthread_key_create and friends Date: Mon, 19 Mar 2001 20:51:52 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 19 Mar 2001 09:46:17.0433 (UTC) FILETIME=[71CECC90:01C0B059] I have a working implementation of pthread_key_create, pthread_key_delete, pthread_getspecific and pthread_setspecific. I'm using Tls index entries (as they are a precise match for the functionality needed).. the problem is there are only 64 available for each process under win32 (until windows 2000). I note that 3/4 index entries are used by existing code in cygwin... my question is, how many is a reasonable number to allocate for pthreads? (The spec requires a #define to be set, which we won't want to change very often.) My code will return error codes if all the slots are used, but it would be better to avoid using all the slots.. For my test code I've set the max amount of indexs avaliable to pthread_key functions at 32 - is 28 remaining index entries to few for future expansion? We should allow as many as possible for the pthread_key functions... Rob