kernel32: Add stubs for fiber local storage APIs
Dmitry Timoshkov
dmitry at codeweavers.com
Fri Feb 29 03:19:43 CST 2008
Hello,
Changelog:
kernel32: Add stubs for fiber local storage APIs.
---
dlls/kernel32/fiber.c | 48 +++++++++++++++++++++++++++++++++++++++++++
dlls/kernel32/kernel32.spec | 4 +++
include/winbase.h | 5 ++++
include/winnt.h | 1 +
4 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/fiber.c b/dlls/kernel32/fiber.c
index 24ea351..e95ef86 100644
--- a/dlls/kernel32/fiber.c
+++ b/dlls/kernel32/fiber.c
@@ -34,6 +34,9 @@
#include "winternl.h"
#include "wine/exception.h"
#include "wine/library.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(fiber);
struct fiber_data
{
@@ -201,3 +204,48 @@ void WINAPI SwitchToFiber( LPVOID fiber )
siglongjmp( new_fiber->jmpbuf, 1 );
}
}
+
+/***********************************************************************
+ * FlsAlloc (KERNEL32.@)
+ */
+DWORD WINAPI FlsAlloc( PFLS_CALLBACK_FUNCTION callback )
+{
+ FIXME( "%p: stub!\n", callback );
+
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FLS_OUT_OF_INDEXES;
+}
+
+/***********************************************************************
+ * FlsFree (KERNEL32.@)
+ */
+BOOL WINAPI FlsFree( DWORD index )
+{
+ FIXME( "%x: stub!\n", index );
+
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
+}
+
+/***********************************************************************
+ * FlsGetValue (KERNEL32.@)
+ */
+PVOID WINAPI FlsGetValue( DWORD index )
+{
+ FIXME( "%x: stub!\n", index );
+
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return NULL;
+}
+
+/***********************************************************************
+ * FlsSetValue (KERNEL32.@)
+ */
+BOOL WINAPI FlsSetValue( DWORD index, PVOID data )
+{
+
+ FIXME( "%x, %p: stub!\n", index, data );
+
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
+}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 6bc867f..112efbf 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -388,6 +388,10 @@
@ stdcall FindResourceW(long wstr wstr)
@ stdcall FindVolumeClose(ptr)
@ stdcall FindVolumeMountPointClose(ptr)
+@ stdcall FlsAlloc(ptr)
+@ stdcall FlsFree(long)
+@ stdcall FlsGetValue(long)
+@ stdcall FlsSetValue(long ptr)
@ stdcall FlushConsoleInputBuffer(long)
@ stdcall FlushFileBuffers(long)
@ stdcall FlushInstructionCache(long long long)
diff --git a/include/winbase.h b/include/winbase.h
index 0011c53..e2ee515 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -315,6 +315,7 @@ typedef struct _PROCESS_HEAP_ENTRY
#define LOCKFILE_FAIL_IMMEDIATELY 1
#define LOCKFILE_EXCLUSIVE_LOCK 2
+#define FLS_OUT_OF_INDEXES ((DWORD)~0UL)
#define TLS_OUT_OF_INDEXES ((DWORD)~0UL)
#define SHUTDOWN_NORETRY 1
@@ -1499,6 +1500,10 @@ WINBASEAPI BOOL WINAPI FindNextVolumeMountPointW(HANDLE,LPWSTR,DWORD);
#define FindNextVolumeMountPoint WINELIB_NAME_AW(FindNextVolumeMountPoint)
WINBASEAPI BOOL WINAPI FindVolumeClose(HANDLE);
WINBASEAPI BOOL WINAPI FindVolumeMountPointClose(HANDLE);
+WINBASEAPI DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION);
+WINBASEAPI BOOL WINAPI FlsFree(DWORD);
+WINBASEAPI PVOID WINAPI FlsGetValue(DWORD);
+WINBASEAPI BOOL WINAPI FlsSetValue(DWORD,PVOID);
WINBASEAPI BOOL WINAPI FlushFileBuffers(HANDLE);
WINBASEAPI BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
WINBASEAPI BOOL WINAPI FlushViewOfFile(LPCVOID,SIZE_T);
diff --git a/include/winnt.h b/include/winnt.h
index 4489e93..cfd1cac 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -4699,6 +4699,7 @@ typedef struct _RTL_CRITICAL_SECTION {
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN );
+typedef VOID (NTAPI * PFLS_CALLBACK_FUNCTION) ( PVOID );
#include <pshpack8.h>
typedef struct _IO_COUNTERS {
--
1.5.4.1
More information about the wine-patches
mailing list