Commit 171bf1e2 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement ExInterlockedRemoveHeadList().

parent 834db731
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include "wine/rbtree.h" #include "wine/rbtree.h"
#include "wine/svcctl.h" #include "wine/svcctl.h"
#include "ntoskrnl_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl); WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
WINE_DECLARE_DEBUG_CHANNEL(relay); WINE_DECLARE_DEBUG_CHANNEL(relay);
WINE_DECLARE_DEBUG_CHANNEL(plugplay); WINE_DECLARE_DEBUG_CHANNEL(plugplay);
...@@ -143,29 +145,6 @@ static CRITICAL_SECTION_DEBUG critsect_debug = ...@@ -143,29 +145,6 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
}; };
static CRITICAL_SECTION drivers_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; static CRITICAL_SECTION drivers_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
#ifdef __i386__
#define DEFINE_FASTCALL1_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(4))
#define DEFINE_FASTCALL2_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 8, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(8))
#define DEFINE_FASTCALL3_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 12, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(12))
#endif
static inline LPCSTR debugstr_us( const UNICODE_STRING *us ) static inline LPCSTR debugstr_us( const UNICODE_STRING *us )
{ {
if (!us) return "<null>"; if (!us) return "<null>";
...@@ -3089,29 +3068,6 @@ NTSTATUS WINAPI ExDeleteResourceLite(PERESOURCE resource) ...@@ -3089,29 +3068,6 @@ NTSTATUS WINAPI ExDeleteResourceLite(PERESOURCE resource)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/*****************************************************
* ExInterlockedRemoveHeadList (NTOSKRNL.EXE.@)
*/
PLIST_ENTRY WINAPI ExInterlockedRemoveHeadList(PLIST_ENTRY head, PKSPIN_LOCK lock)
{
FIXME("(%p %p) stub\n", head, lock);
return NULL;
}
/***********************************************************************
* ExfInterlockedRemoveHeadList (NTOSKRNL.EXE.@)
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL2_ENTRYPOINT( ExfInterlockedRemoveHeadList )
PLIST_ENTRY WINAPI DECLSPEC_HIDDEN __regs_ExfInterlockedRemoveHeadList(PLIST_ENTRY head, PKSPIN_LOCK lock)
#else
PLIST_ENTRY WINAPI ExfInterlockedRemoveHeadList(PLIST_ENTRY head, PKSPIN_LOCK lock)
#endif
{
FIXME("(%p %p) stub\n", head, lock);
return ExInterlockedRemoveHeadList( head, lock );
}
/*********************************************************************** /***********************************************************************
* ExReleaseResourceForThreadLite (NTOSKRNL.EXE.@) * ExReleaseResourceForThreadLite (NTOSKRNL.EXE.@)
*/ */
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
@ stub ExfInterlockedInsertTailList @ stub ExfInterlockedInsertTailList
@ stub ExfInterlockedPopEntryList @ stub ExfInterlockedPopEntryList
@ stub ExfInterlockedPushEntryList @ stub ExfInterlockedPushEntryList
@ stdcall -norelay ExfInterlockedRemoveHeadList(ptr ptr) @ stdcall -norelay -arch=i386 ExfInterlockedRemoveHeadList(ptr ptr)
@ stub ExfReleasePushLock @ stub ExfReleasePushLock
@ stub Exfi386InterlockedDecrementLong @ stub Exfi386InterlockedDecrementLong
@ stub Exfi386InterlockedExchangeUlong @ stub Exfi386InterlockedExchangeUlong
......
/*
* ntoskrnl.exe implementation
*
* Copyright (C) 2007 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_NTOSKRNL_PRIVATE_H
#define __WINE_NTOSKRNL_PRIVATE_H
#ifdef __i386__
#define DEFINE_FASTCALL1_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(4))
#define DEFINE_FASTCALL2_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 8, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(8))
#define DEFINE_FASTCALL3_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 12, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(12))
#endif
#endif
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "ntstatus.h" #include "ntstatus.h"
...@@ -30,6 +31,8 @@ ...@@ -30,6 +31,8 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "ntoskrnl_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl); WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
enum object_type enum object_type
...@@ -433,3 +436,28 @@ void WINAPI IoReleaseCancelSpinLock( KIRQL irql ) ...@@ -433,3 +436,28 @@ void WINAPI IoReleaseCancelSpinLock( KIRQL irql )
TRACE("irql %u.\n", irql); TRACE("irql %u.\n", irql);
KeReleaseSpinLock( &cancel_lock, irql ); KeReleaseSpinLock( &cancel_lock, irql );
} }
#ifdef __i386__
DEFINE_FASTCALL2_ENTRYPOINT( ExfInterlockedRemoveHeadList )
PLIST_ENTRY WINAPI DECLSPEC_HIDDEN __regs_ExfInterlockedRemoveHeadList( LIST_ENTRY *list, KSPIN_LOCK *lock )
{
return ExInterlockedRemoveHeadList( list, lock );
}
#endif
/***********************************************************************
* ExInterlockedRemoveHeadList (NTOSKRNL.EXE.@)
*/
LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList( LIST_ENTRY *list, KSPIN_LOCK *lock )
{
LIST_ENTRY *ret;
KIRQL irql;
TRACE("list %p, lock %p.\n", list, lock);
KeAcquireSpinLock( lock, &irql );
ret = RemoveHeadList( list );
KeReleaseSpinLock( lock, irql );
return ret;
}
...@@ -1386,6 +1386,7 @@ void WINAPI ExFreePool(PVOID); ...@@ -1386,6 +1386,7 @@ void WINAPI ExFreePool(PVOID);
void WINAPI ExFreePoolWithTag(PVOID,ULONG); void WINAPI ExFreePoolWithTag(PVOID,ULONG);
PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK); PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK); PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK);
LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*);
void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX);
void WINAPI IoAcquireCancelSpinLock(KIRQL*); void WINAPI IoAcquireCancelSpinLock(KIRQL*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment