From 6b636e3e7b83f0b3eaa5a81de8b7dec35629f047 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Sat, 25 Jun 2005 18:00:57 +0000 Subject: [PATCH] Use RTL_CRITICAL_SECTION instead of CRITICAL_SECTION. --- dlls/ntdll/cdrom.c | 6 +++--- dlls/ntdll/directory.c | 6 +++--- dlls/ntdll/exception.c | 6 +++--- dlls/ntdll/heap.c | 2 +- dlls/ntdll/loader.c | 6 +++--- dlls/ntdll/ntdll_misc.h | 2 -- dlls/ntdll/rtl.c | 6 +++--- dlls/ntdll/time.c | 6 +++--- dlls/ntdll/virtual.c | 6 +++--- 9 files changed, 22 insertions(+), 24 deletions(-) diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index 5fe80dba429..feb975d1c2d 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -363,14 +363,14 @@ struct cdrom_cache { #define MAX_CACHE_ENTRIES 5 static struct cdrom_cache cdrom_cache[MAX_CACHE_ENTRIES]; -static CRITICAL_SECTION cache_section; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION cache_section; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &cache_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": cache_section") } }; -static CRITICAL_SECTION cache_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION cache_section = { &critsect_debug, -1, 0, 0, 0, 0 }; /* Proposed media change function: not really needed at this time */ /* This is a 1 or 0 type of function */ diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 58b8bd65b1d..f178bfee182 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -135,14 +135,14 @@ static int show_dot_files; /* at some point we may want to allow Winelib apps to set this */ static const int is_case_sensitive = FALSE; -static CRITICAL_SECTION dir_section; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION dir_section; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &dir_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": dir_section") } }; -static CRITICAL_SECTION dir_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION dir_section = { &critsect_debug, -1, 0, 0, 0, 0 }; /* check if a given Unicode char is OK in a DOS short name */ diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c index 4cb62929d9d..9bbfcdab1cb 100644 --- a/dlls/ntdll/exception.c +++ b/dlls/ntdll/exception.c @@ -53,14 +53,14 @@ typedef struct static struct list vectored_handlers = LIST_INIT(vectored_handlers); -static CRITICAL_SECTION vectored_handlers_section; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION vectored_handlers_section; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &vectored_handlers_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": vectored_handlers_section") } }; -static CRITICAL_SECTION vectored_handlers_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION vectored_handlers_section = { &critsect_debug, -1, 0, 0, 0, 0 }; #ifdef __i386__ # define GET_IP(context) ((LPVOID)(context)->Eip) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index c427e2d8465..e5d5bcf2391 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -109,7 +109,7 @@ typedef struct tagHEAP { SUBHEAP subheap; /* First sub-heap */ struct tagHEAP *next; /* Next heap for this process */ - CRITICAL_SECTION critSection; /* Critical section for serialization */ + RTL_CRITICAL_SECTION critSection; /* Critical section for serialization */ FREE_LIST_ENTRY freeList[HEAP_NB_FREE_LISTS]; /* Free lists */ DWORD flags; /* Heap flags */ DWORD magic; /* Magic number */ diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index fce0be9aac8..308a596c3cb 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -96,14 +96,14 @@ static const IMAGE_TLS_DIRECTORY **tls_dirs; /* array of TLS directories */ UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */ -static CRITICAL_SECTION loader_section; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION loader_section; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &loader_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": loader_section") } }; -static CRITICAL_SECTION loader_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION loader_section = { &critsect_debug, -1, 0, 0, 0, 0 }; static WINE_MODREF *cached_modref; static WINE_MODREF *current_modref; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 02de6f1ec9c..5696bad05aa 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -22,9 +22,7 @@ #include #include "windef.h" -#include "winbase.h" #include "winnt.h" -#include "winreg.h" #include "ntstatus.h" #include "winternl.h" #include "wine/server.h" diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index de8b99a586b..d1d8a486c65 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -37,14 +37,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll); -static CRITICAL_SECTION peb_lock; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION peb_lock; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &peb_lock, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": peb_lock") } }; -static CRITICAL_SECTION peb_lock = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION peb_lock = { &critsect_debug, -1, 0, 0, 0, 0 }; /* CRC polynomial 0xedb88320 */ static const DWORD CRC_table[256] = diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index 9cbb9ce87f5..3dc70ac4b4b 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -47,14 +47,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll); -static CRITICAL_SECTION TIME_GetBias_section; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION TIME_GetBias_section; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &TIME_GetBias_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": TIME_GetBias_section") } }; -static CRITICAL_SECTION TIME_GetBias_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION TIME_GetBias_section = { &critsect_debug, -1, 0, 0, 0, 0 }; /* TimeZone registry key values */ static const WCHAR TZInformationKeyW[] = { 'M','a','c','h','i','n','e','\\', diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 6e0a8bb2672..67b8b4ea5ed 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -101,14 +101,14 @@ static const BYTE VIRTUAL_Win32Flags[16] = static struct list views_list = LIST_INIT(views_list); -static CRITICAL_SECTION csVirtual; -static CRITICAL_SECTION_DEBUG critsect_debug = +static RTL_CRITICAL_SECTION csVirtual; +static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &csVirtual, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 0, 0, { 0, (DWORD)(__FILE__ ": csVirtual") } }; -static CRITICAL_SECTION csVirtual = { &critsect_debug, -1, 0, 0, 0, 0 }; +static RTL_CRITICAL_SECTION csVirtual = { &critsect_debug, -1, 0, 0, 0, 0 }; #ifdef __i386__ /* These are always the same on an i386, and it will be faster this way */