| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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 <holger DOT vogt AT uni-duisburg DOT de> |
| 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 |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |