This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/nng/nng.h b/include/nng/nng.h | |
index cd75495a..1c6b7a61 100644 | |
--- a/include/nng/nng.h | |
+++ b/include/nng/nng.h | |
@@ -1179,6 +1179,11 @@ NNG_DECL int nng_stream_listener_set_ptr( | |
NNG_DECL int nng_stream_listener_set_addr( | |
nng_stream_listener *, const char *, const nng_sockaddr *); | |
+#define NNG_CAN_LIMIT_THREADS | |
+NNG_DECL void nng_set_ncpu_max(int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00007FFE496CBBB0 mov qword ptr [rsp+8],rbx | |
00007FFE496CBBB5 push rdi | |
00007FFE496CBBB6 sub rsp,20h | |
00007FFE496CBBBA mov r8b,byte ptr [7FFE03C6h] | |
00007FFE496CBBC2 mov rbx,rcx | |
00007FFE496CBBC5 test r8b,1 | |
00007FFE496CBBC9 je 00007FFE496CBC3B | |
00007FFE496CBBCB mov r11,qword ptr [7FFE03B8h] | |
00007FFE496CBBD3 test r8b,2 | |
00007FFE496CBBD7 je 00007FFE497698FF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00007FFE496CBBB0 mov qword ptr [rsp+8],rbx | |
00007FFE496CBBB5 push rdi | |
00007FFE496CBBB6 sub rsp,20h | |
00007FFE496CBBBA mov r8b,byte ptr [7FFE03C6h] | |
00007FFE496CBBC2 mov rbx,rcx | |
00007FFE496CBBC5 test r8b,1 | |
00007FFE496CBBC9 je 00007FFE496CBC3B | |
00007FFE496CBBCB mov r11,qword ptr [7FFE03B8h] | |
00007FFE496CBBD3 test r8b,2 | |
00007FFE496CBBD7 je 00007FFE497698FF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00007FFE496CBBB0 mov qword ptr [rsp+8],rbx | |
00007FFE496CBBB5 push rdi | |
00007FFE496CBBB6 sub rsp,20h | |
00007FFE496CBBBA mov r8b,byte ptr [7FFE03C6h] | |
00007FFE496CBBC2 mov rbx,rcx | |
00007FFE496CBBC5 test r8b,1 | |
00007FFE496CBBC9 je 00007FFE496CBC3B | |
00007FFE496CBBCB mov r11,qword ptr [7FFE03B8h] | |
00007FFE496CBBD3 test r8b,2 | |
00007FFE496CBBD7 je 00007FFE497698FF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PrjClearNegativePathCache, 1, 0x3820 | |
PrjCloseFile, 2, 0x2800 | |
PrjCommandCallbacksInit, 3, 0x3d20 | |
PrjCompleteCommand, 4, 0x34e0 | |
PrjConfigureVolume, 5, 0x52b0 | |
PrjConvertDirectoryToPlaceholder, 6, 0x1330 | |
PrjCreatePlaceholderAsHardlink, 7, 0x1ea0 | |
PrjDeleteFile, 8, 0x3120 | |
PrjDetachDriver, 9, 0x5110 | |
PrjDoesNameContainWildCards, 10, 0x5810 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 12 : { | |
$LN6: | |
sub rsp, 40 ; 00000028H | |
; 13 : AllocatingBuffer outBuf; | |
lea rcx, QWORD PTR outBuf$[rsp] | |
call ??0AllocatingBuffer@@QEAA@XZ ; AllocatingBuffer::AllocatingBuffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize uv_async_t for shutting down event loop | |
m_shutdownAsync.data = this; | |
uv_async_init(m_eventLoop, &m_shutdownAsync, [](uv_async_t* handle, int status) { | |
auto thisPtr = reinterpret_cast<DiscoService*>(handle->data); | |
uv_close((uv_handle_t*) handle, nullptr); | |
uv_close((uv_handle_t*) &thisPtr->m_recvSocket, nullptr); | |
uv_close((uv_handle_t*) &thisPtr->m_sendSocket, nullptr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HANDLE h = CreateEvent(NULL, TRUE, FALSE, NULL); | |
DWORD dwExitCode = 9999; | |
if (GetExitCodeProcess(h, &dwExitCode)) | |
{ | |
printf("Developers, developers, developers!"); | |
CloseHandle(h); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct tagTHREADNAME_INFO | |
{ | |
DWORD dwType; // Must be 0x1000 | |
LPCSTR szName; // Pointer to name (in user address space) | |
DWORD dwThreadID; // Thread ID (-1 for caller thread) | |
DWORD dwFlags; // Reserved for future use; must be zero | |
} THREADNAME_INFO; | |
static void setThreadName(DWORD dwThreadID, LPCSTR szThreadName ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isNumber(const char number) | |
{ | |
std::string tmp; | |
tmp += number; | |
return std::string::npos != findIgnoreCase("0123456789", tmp); | |
} |