From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26157 invoked by alias); 21 Jun 2006 16:28:18 -0000 Received: (qmail 26107 invoked by uid 22791); 21 Jun 2006 16:28:16 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 21 Jun 2006 16:28:13 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5LGSAC3017225 for ; Wed, 21 Jun 2006 12:28:10 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5LGSAoF020852; Wed, 21 Jun 2006 12:28:10 -0400 Received: from [172.16.14.67] (towel.toronto.redhat.com [172.16.14.67]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k5LGSAve017394; Wed, 21 Jun 2006 12:28:10 -0400 Message-ID: <4499739A.7080701@redhat.com> Date: Wed, 21 Jun 2006 16:28:00 -0000 From: Bryce McKinlay User-Agent: Thunderbird 1.5 (X11/20051025) MIME-Version: 1.0 To: Keith Seitz CC: Java Patch List Subject: Re: [RFA] Boehm GC support addition for debugging References: <4496CF73.7000507@redhat.com> <449848BF.8070503@redhat.com> <449851B0.5020105@redhat.com> <44988D58.9060804@redhat.com> <44995B1C.8060702@redhat.com> In-Reply-To: <44995B1C.8060702@redhat.com> Content-Type: multipart/mixed; boundary="------------050608000709030800090609" X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q2/txt/msg00453.txt.bz2 This is a multi-part message in MIME format. --------------050608000709030800090609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 434 Keith Seitz wrote: > Bryce McKinlay wrote: > >> Would the following work? _Jv_SuspendThread would take a >> _Jv_ThreadDesc_t argument, and use _Jv_GetPlatformThreadID() on it. >> GC_suspend_thread() etc would be defined in gc.h with whatever the >> correct argument type is depending on the platform. > > Yeah, that should work. I think this is a combination of nos. 3 and 4 > on my list: I've checked this in to trunk. Bryce --------------050608000709030800090609 Content-Type: text/x-patch; name="libgcj-thread-id.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libgcj-thread-id.patch" Content-length: 1337 2006-06-21 Bryce McKinlay * include/win32-threads.h (_Jv_ThreadDesc_t): New typedef. (_Jv_GetPlatformThreadID): New function. * include/posix-threads.h (_Jv_ThreadDesc_t): New typedef. (_Jv_GetPlatformThreadID): New function. Index: win32-threads.h =================================================================== --- win32-threads.h (revision 114472) +++ win32-threads.h (working copy) @@ -72,6 +72,15 @@ typedef void _Jv_ThreadStartFunc (java::lang::Thread *); +// Type identifying a win32 thread. +typedef HANDLE _Jv_ThreadDesc_t; + +inline _Jv_ThreadDesc_t +_Jv_GetPlatformThreadID(_Jv_Thread_t *t) +{ + return t->handle; +} + // // Condition variables. // Index: posix-threads.h =================================================================== --- posix-threads.h (revision 114472) +++ posix-threads.h (working copy) @@ -47,7 +47,6 @@ typedef void _Jv_ThreadStartFunc (java::lang::Thread *); - // Condition Variables used to implement wait/notify/sleep/interrupt. typedef struct { @@ -82,6 +81,15 @@ return (mu->owner != pthread_self()); } +// Type identifying a POSIX thread. +typedef pthread_t _Jv_ThreadDesc_t; + +inline _Jv_ThreadDesc_t +_Jv_GetPlatformThreadID(_Jv_Thread_t *t) +{ + return t->thread; +} + // // Condition variables. // --------------050608000709030800090609--