Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B112AAB.CC66CD60@unidui.uni-duisburg.de> Date: Sun, 27 May 2001 18:26:19 +0200 From: Holger Vogt Reply-To: holger DOT vogt AT uni-duisburg DOT de X-Mailer: Mozilla 4.73 [de]C-CCK-MCD CSO 2.0 (Win98; U) X-Accept-Language: de,en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: GetCurrentFiber GetFiberData Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit A test case PVOID mainfiber = ConvertThreadToFiber((PVOID)0x1); PVOID test = GetCurrentFiber(); PVOID test1 = GetFiberData(); deliveres the following data: mainfiber 0x8e000c test 0x1 test1 0x8e000c. This is wrong. The correct results should read mainfiber 0x8e000c test 0x8e000c test1 0x1. The function names GetCurrentFiber and GetFiberData seem to be mixed up in winnt.h. The corrected section in winnt.h should read: extern __inline PVOID GetFiberData(void) { void* ret; __asm__ volatile ("\n\ movl %%fs:0x10,%0\n\ movl (%0),%0\n\ " : "=r" (ret) /* allow use of reg eax, ebx, ecx, edx, esi, edi */ : ); return ret; } extern __inline PVOID GetCurrentFiber(void) { void* ret; __asm__ volatile ("\n\ movl %%fs:0x10,%0\n\ " : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */ : ); return ret; } Please check and correct, if o.k. Holger -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple