Commit 4b3e820e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.

To match Microsoft's public definition. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent feeb1c7c
...@@ -3816,7 +3816,7 @@ static void test_InMemoryOrderModuleList(void) ...@@ -3816,7 +3816,7 @@ static void test_InMemoryOrderModuleList(void)
entry1 = entry1->Flink, entry2 = entry2->Flink) entry1 = entry1->Flink, entry2 = entry2->Flink)
{ {
module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2); ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2);
} }
ok(entry1 == mark1, "expected entry1 == mark1, got %p and %p\n", entry1, mark1); ok(entry1 == mark1, "expected entry1 == mark1, got %p and %p\n", entry1, mark1);
......
...@@ -478,7 +478,7 @@ static WINE_MODREF *get_modref( HMODULE hmod ) ...@@ -478,7 +478,7 @@ static WINE_MODREF *get_modref( HMODULE hmod )
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
if (mod->BaseAddress == hmod) if (mod->BaseAddress == hmod)
return cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); return cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
} }
...@@ -1226,7 +1226,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name ...@@ -1226,7 +1226,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList, InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList,
&wm->ldr.InLoadOrderModuleList); &wm->ldr.InLoadOrderModuleList);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderModuleList); &wm->ldr.InMemoryOrderLinks);
/* wait until init is called for inserting into InInitializationOrderModuleList */ /* wait until init is called for inserting into InInitializationOrderModuleList */
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
...@@ -1638,7 +1638,7 @@ NTSTATUS WINAPI LdrFindEntryForAddress( const void *addr, PLDR_DATA_TABLE_ENTRY ...@@ -1638,7 +1638,7 @@ NTSTATUS WINAPI LdrFindEntryForAddress( const void *addr, PLDR_DATA_TABLE_ENTRY
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
if (mod->BaseAddress <= addr && if (mod->BaseAddress <= addr &&
(const char *)addr < (char*)mod->BaseAddress + mod->SizeOfImage) (const char *)addr < (char*)mod->BaseAddress + mod->SizeOfImage)
{ {
...@@ -1668,7 +1668,7 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback, ...@@ -1668,7 +1668,7 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback,
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList ); mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks );
callback( mod, context, &stop ); callback( mod, context, &stop );
if (stop) break; if (stop) break;
} }
...@@ -2029,7 +2029,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN ...@@ -2029,7 +2029,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
{ {
/* the module has only been inserted in the load & memory order lists */ /* the module has only been inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
/* FIXME: free the modref */ /* FIXME: free the modref */
return status; return status;
} }
...@@ -2572,7 +2572,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam ...@@ -2572,7 +2572,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
{ {
/* the module has only be inserted in the load & memory order lists */ /* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
/* FIXME: there are several more dangling references /* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the * left. Including dlls loaded by this dll before the
...@@ -3790,7 +3790,7 @@ void WINAPI LdrShutdownThread(void) ...@@ -3790,7 +3790,7 @@ void WINAPI LdrShutdownThread(void)
static void free_modref( WINE_MODREF *wm ) static void free_modref( WINE_MODREF *wm )
{ {
RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
if (wm->ldr.InInitializationOrderModuleList.Flink) if (wm->ldr.InInitializationOrderModuleList.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderModuleList); RemoveEntryList(&wm->ldr.InInitializationOrderModuleList);
...@@ -4578,8 +4578,8 @@ void __wine_process_init(void) ...@@ -4578,8 +4578,8 @@ void __wine_process_init(void)
/* the main exe needs to be the first in the load order list */ /* the main exe needs to be the first in the load order list */
RemoveEntryList( &wm->ldr.InLoadOrderModuleList ); RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList ); InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
RemoveEntryList( &wm->ldr.InMemoryOrderModuleList ); RemoveEntryList( &wm->ldr.InMemoryOrderLinks );
InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList ); InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks );
virtual_alloc_thread_stack( &stack, 0, 0, NULL ); virtual_alloc_thread_stack( &stack, 0, 0, NULL );
teb->Tib.StackBase = stack.StackBase; teb->Tib.StackBase = stack.StackBase;
......
...@@ -3455,7 +3455,7 @@ static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DAT ...@@ -3455,7 +3455,7 @@ static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DAT
/* expect module to be last module listed in LdrData load order list */ /* expect module to be last module listed in LdrData load order list */
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress); data->Loaded.DllBase, mod->BaseAddress);
ok(!lstrcmpiW(mod->BaseDllName.Buffer, expected_dll), "Expected %s, got %s\n", ok(!lstrcmpiW(mod->BaseDllName.Buffer, expected_dll), "Expected %s, got %s\n",
...@@ -3516,7 +3516,7 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA ...@@ -3516,7 +3516,7 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA
return; return;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress); data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase) if (mod->BaseAddress != data->Loaded.DllBase)
...@@ -3555,7 +3555,7 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION ...@@ -3555,7 +3555,7 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION
return; return;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress); data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase) if (mod->BaseAddress != data->Loaded.DllBase)
......
...@@ -2320,7 +2320,7 @@ typedef enum _LDR_DLL_LOAD_REASON ...@@ -2320,7 +2320,7 @@ typedef enum _LDR_DLL_LOAD_REASON
typedef struct _LDR_DATA_TABLE_ENTRY typedef struct _LDR_DATA_TABLE_ENTRY
{ {
LIST_ENTRY InLoadOrderModuleList; LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InMemoryOrderModuleList; LIST_ENTRY InMemoryOrderLinks;
LIST_ENTRY InInitializationOrderModuleList; LIST_ENTRY InInitializationOrderModuleList;
void* BaseAddress; void* BaseAddress;
void* EntryPoint; void* EntryPoint;
......
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