Rebase against 6a072b98c100f38a61fad00b6c96c86b3445efac.

This commit is contained in:
Zebediah Figura 2021-11-10 00:33:41 -06:00
parent 63c3baa9e5
commit c165d96d23
6 changed files with 57 additions and 57 deletions

View File

@ -1,4 +1,4 @@
From c83cd4d1151d182c3ae35f87b20b6ba30cf24316 Mon Sep 17 00:00:00 2001
From 08cec34b6dccea0cf7e8f880911786fd385ed78a Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 7 Jun 2021 16:26:18 -0500
Subject: [PATCH] ntdll: Reimplement Win32 futexes on top of thread-ID alerts.
@ -268,12 +268,12 @@ index bfb30661864..db68a466d8a 100644
+ if (tid) NtAlertThreadByThreadId( (HANDLE)(DWORD_PTR)tid );
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index a9645d45653..2504311053b 100644
index 7f36dc42579..05ae264297a 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -2148,9 +2148,6 @@ static struct unix_funcs unix_funcs =
@@ -2145,9 +2145,6 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
- RtlWaitOnAddress,
- RtlWakeAddressAll,
@ -282,10 +282,10 @@ index a9645d45653..2504311053b 100644
fast_RtlpUnWaitCriticalSection,
fast_RtlDeleteCriticalSection,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 7f5d9a49ef5..43838e593dc 100644
index cdc63c8a6ef..47a0a03b45f 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -78,10 +78,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
@@ -73,10 +73,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
HANDLE keyed_event = 0;
@ -296,7 +296,7 @@ index 7f5d9a49ef5..43838e593dc 100644
static const char *debugstr_timeout( const LARGE_INTEGER *timeout )
{
if (!timeout) return "(infinite)";
@@ -191,24 +187,6 @@ static void timespec_from_timeout( struct timespec *timespec, const LARGE_INTEGE
@@ -186,24 +182,6 @@ static void timespec_from_timeout( struct timespec *timespec, const LARGE_INTEGE
#endif
@ -321,7 +321,7 @@ index 7f5d9a49ef5..43838e593dc 100644
/* create a struct security_descriptor and contained information in one contiguous piece of memory */
NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len )
@@ -2982,71 +2960,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
@@ -2977,71 +2955,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
return STATUS_SUCCESS;
}
@ -393,7 +393,7 @@ index 7f5d9a49ef5..43838e593dc 100644
#else
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -3089,79 +3002,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
@@ -3084,79 +2997,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
return STATUS_NOT_IMPLEMENTED;
}
@ -474,21 +474,21 @@ index 7f5d9a49ef5..43838e593dc 100644
- mutex_unlock( &addr_mutex );
-}
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index d56259deff2..c602e6c9af0 100644
index 62030d91cdb..ded05c40e17 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 127
+#define NTDLL_UNIXLIB_VERSION 128
-#define NTDLL_UNIXLIB_VERSION 128
+#define NTDLL_UNIXLIB_VERSION 129
struct unix_funcs
{
@@ -38,10 +38,6 @@ struct unix_funcs
@@ -37,10 +37,6 @@ struct unix_funcs
/* other Win32 API functions */
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
- NTSTATUS (WINAPI *RtlWaitOnAddress)( const void *addr, const void *cmp, SIZE_T size,
- const LARGE_INTEGER *timeout );

View File

@ -1,4 +1,4 @@
From ce1c07228439555e3cdf5e68298fc7cf542a0ff5 Mon Sep 17 00:00:00 2001
From 628256e87f979280f1251b1a90a0ac25a0469e6c Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:38:09 -0500
Subject: [PATCH] ntdll: Reimplement the critical section fast path on top of
@ -84,12 +84,12 @@ index db68a466d8a..3a47679bb60 100644
return ret;
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 2504311053b..173e611b018 100644
index 05ae264297a..1dbcc0d7a7b 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -2148,9 +2148,6 @@ static struct unix_funcs unix_funcs =
@@ -2145,9 +2145,6 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
- fast_RtlpWaitForCriticalSection,
- fast_RtlpUnWaitCriticalSection,
@ -98,10 +98,10 @@ index 2504311053b..173e611b018 100644
fast_RtlAcquireSRWLockExclusive,
fast_RtlTryAcquireSRWLockShared,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 43838e593dc..6a636d30f21 100644
index 47a0a03b45f..12df0c90d73 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -2555,115 +2555,6 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
@@ -2550,115 +2550,6 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
#endif
@ -218,10 +218,10 @@ index 43838e593dc..6a636d30f21 100644
/* Futex-based SRW lock implementation:
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 6b8835bcba0..d142fa894b1 100644
index 641de0c465f..d44a9e128ff 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -101,10 +101,6 @@ extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PT
@@ -100,10 +100,6 @@ extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PT
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
extern void (WINAPI *p__wine_ctrl_routine)(void *) DECLSPEC_HIDDEN;
extern SYSTEM_DLL_INIT_BLOCK *pLdrSystemDllInitBlock DECLSPEC_HIDDEN;
@ -233,19 +233,19 @@ index 6b8835bcba0..d142fa894b1 100644
extern NTSTATUS CDECL fast_RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index c602e6c9af0..25a624c3e21 100644
index ded05c40e17..535f76a647e 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 128
+#define NTDLL_UNIXLIB_VERSION 129
-#define NTDLL_UNIXLIB_VERSION 129
+#define NTDLL_UNIXLIB_VERSION 130
struct unix_funcs
{
@@ -40,9 +40,6 @@ struct unix_funcs
@@ -39,9 +39,6 @@ struct unix_funcs
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
/* fast locks */

View File

@ -1,4 +1,4 @@
From cde4ea0e9ec950f3f2dd95b3f96cee83b948da3d Mon Sep 17 00:00:00 2001
From c8044d65c40d67569c0fdbc26ce69c52b0fd3595 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:55:29 -0500
Subject: [PATCH] ntdll: Get rid of the direct futex path for condition
@ -81,10 +81,10 @@ index 3a47679bb60..6e68d07b81b 100644
if (flags & RTL_CONDITION_VARIABLE_LOCKMODE_SHARED)
RtlAcquireSRWLockShared( lock );
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 173e611b018..86cd373b21d 100644
index 1dbcc0d7a7b..32aa7267423 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -2154,8 +2154,6 @@ static struct unix_funcs unix_funcs =
@@ -2151,8 +2151,6 @@ static struct unix_funcs unix_funcs =
fast_RtlAcquireSRWLockShared,
fast_RtlReleaseSRWLockExclusive,
fast_RtlReleaseSRWLockShared,
@ -94,10 +94,10 @@ index 173e611b018..86cd373b21d 100644
init_builtin_dll,
init_unix_lib,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 6a636d30f21..f0267c2df1c 100644
index 12df0c90d73..7a2466f5fa3 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -167,23 +167,6 @@ static int *get_futex(void **ptr)
@@ -162,23 +162,6 @@ static int *get_futex(void **ptr)
return NULL;
}
@ -121,7 +121,7 @@ index 6a636d30f21..f0267c2df1c 100644
#endif
@@ -2807,50 +2790,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -2802,50 +2785,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
return STATUS_SUCCESS;
}
@ -172,7 +172,7 @@ index 6a636d30f21..f0267c2df1c 100644
#else
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -2883,14 +2822,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -2878,14 +2817,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
return STATUS_NOT_IMPLEMENTED;
}
@ -188,10 +188,10 @@ index 6a636d30f21..f0267c2df1c 100644
-
#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index d142fa894b1..f192215f32a 100644
index d44a9e128ff..61f37d4b22f 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -107,10 +107,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
@@ -106,10 +106,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
extern NTSTATUS CDECL fast_RtlAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
@ -203,19 +203,19 @@ index d142fa894b1..f192215f32a 100644
extern NTSTATUS CDECL unwind_builtin_dll( ULONG type, struct _DISPATCHER_CONTEXT *dispatch,
CONTEXT *context ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 25a624c3e21..51771b1b5d6 100644
index 535f76a647e..a271bb05da9 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 129
+#define NTDLL_UNIXLIB_VERSION 130
-#define NTDLL_UNIXLIB_VERSION 130
+#define NTDLL_UNIXLIB_VERSION 131
struct unix_funcs
{
@@ -46,9 +46,6 @@ struct unix_funcs
@@ -45,9 +45,6 @@ struct unix_funcs
NTSTATUS (CDECL *fast_RtlAcquireSRWLockShared)( RTL_SRWLOCK *lock );
NTSTATUS (CDECL *fast_RtlReleaseSRWLockExclusive)( RTL_SRWLOCK *lock );
NTSTATUS (CDECL *fast_RtlReleaseSRWLockShared)( RTL_SRWLOCK *lock );

View File

@ -1,4 +1,4 @@
From 0c3f702c6a607cec5d8553b27ed9fd35f1864211 Mon Sep 17 00:00:00 2001
From 2c2b45abf167701ed4736fcc7530b9927ff67ee5 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 22 Nov 2020 20:51:10 -0600
Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes.
@ -393,12 +393,12 @@ index 6e68d07b81b..e380f3e4e93 100644
/***********************************************************************
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 86cd373b21d..4d3b5593b96 100644
index 32aa7267423..3d26da194e4 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -2148,12 +2148,6 @@ static struct unix_funcs unix_funcs =
@@ -2145,12 +2145,6 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
- fast_RtlTryAcquireSRWLockExclusive,
- fast_RtlAcquireSRWLockExclusive,
@ -410,10 +410,10 @@ index 86cd373b21d..4d3b5593b96 100644
init_builtin_dll,
init_unix_lib,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index f0267c2df1c..19a499ff2c9 100644
index 7a2466f5fa3..0065f265e42 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -115,8 +115,6 @@ static inline ULONGLONG monotonic_counter(void)
@@ -110,8 +110,6 @@ static inline ULONGLONG monotonic_counter(void)
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@ -422,7 +422,7 @@ index f0267c2df1c..19a499ff2c9 100644
static int futex_private = 128;
@@ -130,16 +128,6 @@ static inline int futex_wake( const int *addr, int val )
@@ -125,16 +123,6 @@ static inline int futex_wake( const int *addr, int val )
return syscall( __NR_futex, addr, FUTEX_WAKE | futex_private, val, NULL, 0, 0 );
}
@ -439,7 +439,7 @@ index f0267c2df1c..19a499ff2c9 100644
static inline int use_futexes(void)
{
static int supported = -1;
@@ -157,16 +145,6 @@ static inline int use_futexes(void)
@@ -152,16 +140,6 @@ static inline int use_futexes(void)
return supported;
}
@ -456,7 +456,7 @@ index f0267c2df1c..19a499ff2c9 100644
#endif
@@ -2537,289 +2515,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
@@ -2532,289 +2510,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
}
#endif
@ -747,10 +747,10 @@ index f0267c2df1c..19a499ff2c9 100644
-
-#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index f192215f32a..fc52b7d210e 100644
index 61f37d4b22f..b499978b2fe 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -101,12 +101,6 @@ extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PT
@@ -100,12 +100,6 @@ extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PT
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
extern void (WINAPI *p__wine_ctrl_routine)(void *) DECLSPEC_HIDDEN;
extern SYSTEM_DLL_INIT_BLOCK *pLdrSystemDllInitBlock DECLSPEC_HIDDEN;
@ -764,20 +764,20 @@ index f192215f32a..fc52b7d210e 100644
extern NTSTATUS CDECL unwind_builtin_dll( ULONG type, struct _DISPATCHER_CONTEXT *dispatch,
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 51771b1b5d6..7a63f6f1ec6 100644
index a271bb05da9..803b6a082bb 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 130
+#define NTDLL_UNIXLIB_VERSION 131
-#define NTDLL_UNIXLIB_VERSION 131
+#define NTDLL_UNIXLIB_VERSION 132
struct unix_funcs
{
@@ -39,14 +39,6 @@ struct unix_funcs
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
@@ -38,14 +38,6 @@ struct unix_funcs
/* other Win32 API functions */
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
- /* fast locks */

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "20f1a677b664b3d0d3dc038ffb9ab4f4e4aa6274"
echo "6a072b98c100f38a61fad00b6c96c86b3445efac"
}
# Show version information

View File

@ -1 +1 @@
20f1a677b664b3d0d3dc038ffb9ab4f4e4aa6274
6a072b98c100f38a61fad00b6c96c86b3445efac