From c008984a01e43401159cfd08bea32851a8130212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 24 Jan 2010 16:31:19 +0100 Subject: [PATCH] kernel32: Implement IsThreadAFiber function. --- dlls/kernel32/fiber.c | 8 ++++++++ dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/tests/fiber.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/fiber.c b/dlls/kernel32/fiber.c index f828cdc3a1b..c8666617c9b 100644 --- a/dlls/kernel32/fiber.c +++ b/dlls/kernel32/fiber.c @@ -304,3 +304,11 @@ BOOL WINAPI FlsSetValue( DWORD index, PVOID data ) NtCurrentTeb()->FlsSlots[index] = data; return TRUE; } + +/*********************************************************************** + * IsThreadAFiber (KERNEL32.@) + */ +BOOL WINAPI IsThreadAFiber(void) +{ + return NtCurrentTeb()->Tib.u.FiberData != NULL; +} diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 3b772ba28b7..db9713f8901 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -749,6 +749,7 @@ @ stdcall IsProcessorFeaturePresent(long) @ stub -i386 IsSLCallback @ stdcall IsSystemResumeAutomatic() +@ stdcall IsThreadAFiber() @ stdcall IsValidCodePage(long) @ stdcall IsValidLanguageGroup(long long) @ stdcall IsValidLocale(long long) diff --git a/dlls/kernel32/tests/fiber.c b/dlls/kernel32/tests/fiber.c index 7009a0332c1..dac9d6a83a9 100644 --- a/dlls/kernel32/tests/fiber.c +++ b/dlls/kernel32/tests/fiber.c @@ -146,7 +146,7 @@ static void test_FiberHandling(void) if (!pIsThreadAFiber) { - skip( "IsThreadAFiber not present\n" ); + win_skip( "IsThreadAFiber not present\n" ); return; }