Skip to content

Commit

Permalink
deps: backport 98239224 from libuv upstream
Browse files Browse the repository at this point in the history
Original commit message:

    win: don't fetch function pointers to SRWLock APIs

    They're no longer needed, since the Windows-native SRWLock functions are
    no longer used.

    PR-URL: libuv/libuv#525
    Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

PR-URL: nodejs-private/node-private#54
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
  • Loading branch information
rvagg committed Jun 23, 2016
1 parent 5df21b2 commit 9627f34
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 76 deletions.
20 changes: 0 additions & 20 deletions deps/uv/src/win/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,8 @@
#include "internal.h"


#define HAVE_SRWLOCK_API() (pTryAcquireSRWLockShared != NULL)
#define HAVE_CONDVAR_API() (pInitializeConditionVariable != NULL)

static int uv__rwlock_srwlock_init(uv_rwlock_t* rwlock);
static void uv__rwlock_srwlock_destroy(uv_rwlock_t* rwlock);
static void uv__rwlock_srwlock_rdlock(uv_rwlock_t* rwlock);
static int uv__rwlock_srwlock_tryrdlock(uv_rwlock_t* rwlock);
static void uv__rwlock_srwlock_rdunlock(uv_rwlock_t* rwlock);
static void uv__rwlock_srwlock_wrlock(uv_rwlock_t* rwlock);
static int uv__rwlock_srwlock_trywrlock(uv_rwlock_t* rwlock);
static void uv__rwlock_srwlock_wrunlock(uv_rwlock_t* rwlock);

static int uv__rwlock_fallback_init(uv_rwlock_t* rwlock);
static void uv__rwlock_fallback_destroy(uv_rwlock_t* rwlock);
static void uv__rwlock_fallback_rdlock(uv_rwlock_t* rwlock);
static int uv__rwlock_fallback_tryrdlock(uv_rwlock_t* rwlock);
static void uv__rwlock_fallback_rdunlock(uv_rwlock_t* rwlock);
static void uv__rwlock_fallback_wrlock(uv_rwlock_t* rwlock);
static int uv__rwlock_fallback_trywrlock(uv_rwlock_t* rwlock);
static void uv__rwlock_fallback_wrunlock(uv_rwlock_t* rwlock);


static int uv_cond_fallback_init(uv_cond_t* cond);
static void uv_cond_fallback_destroy(uv_cond_t* cond);
static void uv_cond_fallback_signal(uv_cond_t* cond);
Expand Down
28 changes: 0 additions & 28 deletions deps/uv/src/win/winapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes;
sCreateSymbolicLinkW pCreateSymbolicLinkW;
sCancelIoEx pCancelIoEx;
sInitializeSRWLock pInitializeSRWLock;
sAcquireSRWLockShared pAcquireSRWLockShared;
sAcquireSRWLockExclusive pAcquireSRWLockExclusive;
sTryAcquireSRWLockShared pTryAcquireSRWLockShared;
sTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive;
sReleaseSRWLockShared pReleaseSRWLockShared;
sReleaseSRWLockExclusive pReleaseSRWLockExclusive;
sInitializeConditionVariable pInitializeConditionVariable;
sSleepConditionVariableCS pSleepConditionVariableCS;
sSleepConditionVariableSRW pSleepConditionVariableSRW;
Expand Down Expand Up @@ -129,27 +122,6 @@ void uv_winapi_init() {
pCancelIoEx = (sCancelIoEx)
GetProcAddress(kernel32_module, "CancelIoEx");

pInitializeSRWLock = (sInitializeSRWLock)
GetProcAddress(kernel32_module, "InitializeSRWLock");

pAcquireSRWLockShared = (sAcquireSRWLockShared)
GetProcAddress(kernel32_module, "AcquireSRWLockShared");

pAcquireSRWLockExclusive = (sAcquireSRWLockExclusive)
GetProcAddress(kernel32_module, "AcquireSRWLockExclusive");

pTryAcquireSRWLockShared = (sTryAcquireSRWLockShared)
GetProcAddress(kernel32_module, "TryAcquireSRWLockShared");

pTryAcquireSRWLockExclusive = (sTryAcquireSRWLockExclusive)
GetProcAddress(kernel32_module, "TryAcquireSRWLockExclusive");

pReleaseSRWLockShared = (sReleaseSRWLockShared)
GetProcAddress(kernel32_module, "ReleaseSRWLockShared");

pReleaseSRWLockExclusive = (sReleaseSRWLockExclusive)
GetProcAddress(kernel32_module, "ReleaseSRWLockExclusive");

pInitializeConditionVariable = (sInitializeConditionVariable)
GetProcAddress(kernel32_module, "InitializeConditionVariable");

Expand Down
28 changes: 0 additions & 28 deletions deps/uv/src/win/winapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -4655,27 +4655,6 @@ typedef BOOL (WINAPI* sCancelIoEx)
(HANDLE hFile,
LPOVERLAPPED lpOverlapped);

typedef VOID (WINAPI* sInitializeSRWLock)
(PSRWLOCK SRWLock);

typedef VOID (WINAPI* sAcquireSRWLockShared)
(PSRWLOCK SRWLock);

typedef VOID (WINAPI* sAcquireSRWLockExclusive)
(PSRWLOCK SRWLock);

typedef BOOL (WINAPI* sTryAcquireSRWLockShared)
(PSRWLOCK SRWLock);

typedef BOOL (WINAPI* sTryAcquireSRWLockExclusive)
(PSRWLOCK SRWLock);

typedef VOID (WINAPI* sReleaseSRWLockShared)
(PSRWLOCK SRWLock);

typedef VOID (WINAPI* sReleaseSRWLockExclusive)
(PSRWLOCK SRWLock);

typedef VOID (WINAPI* sInitializeConditionVariable)
(PCONDITION_VARIABLE ConditionVariable);

Expand Down Expand Up @@ -4714,13 +4693,6 @@ extern sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
extern sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes;
extern sCreateSymbolicLinkW pCreateSymbolicLinkW;
extern sCancelIoEx pCancelIoEx;
extern sInitializeSRWLock pInitializeSRWLock;
extern sAcquireSRWLockShared pAcquireSRWLockShared;
extern sAcquireSRWLockExclusive pAcquireSRWLockExclusive;
extern sTryAcquireSRWLockShared pTryAcquireSRWLockShared;
extern sTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive;
extern sReleaseSRWLockShared pReleaseSRWLockShared;
extern sReleaseSRWLockExclusive pReleaseSRWLockExclusive;
extern sInitializeConditionVariable pInitializeConditionVariable;
extern sSleepConditionVariableCS pSleepConditionVariableCS;
extern sSleepConditionVariableSRW pSleepConditionVariableSRW;
Expand Down

0 comments on commit 9627f34

Please sign in to comment.