commit
7503efed27
@ -702,13 +702,6 @@ endif()
|
||||
|
||||
include(CommonConfigOptions)
|
||||
|
||||
# WinPR
|
||||
# We want to control the winpr assert for the whole project
|
||||
option(WITH_VERBOSE_WINPR_ASSERT "Compile with verbose WINPR_ASSERT." ON)
|
||||
if (WITH_VERBOSE_WINPR_ASSERT)
|
||||
add_definitions(-DWITH_VERBOSE_WINPR_ASSERT)
|
||||
endif()
|
||||
|
||||
if (FREERDP_UNIFIED_BUILD)
|
||||
add_subdirectory(winpr)
|
||||
if (WITH_WAYLAND)
|
||||
|
@ -5,6 +5,12 @@ option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON)
|
||||
option(WITH_BINARY_VERSIONING "Use binary versioning" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
|
||||
# We want to control the winpr assert for the whole project
|
||||
option(WITH_VERBOSE_WINPR_ASSERT "Compile with verbose WINPR_ASSERT." ON)
|
||||
if (WITH_VERBOSE_WINPR_ASSERT)
|
||||
add_definitions(-DWITH_VERBOSE_WINPR_ASSERT)
|
||||
endif()
|
||||
|
||||
# known issue on android, thus disabled until we support newer CMake
|
||||
# https://github.com/android/ndk/issues/1444
|
||||
if (NOT ANDROID)
|
||||
|
@ -75,7 +75,6 @@ else()
|
||||
set(WITH_INTERNAL_MD5_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
option(WITH_VERBOSE_WINPR_ASSERT "Compile with verbose WINPR_ASSERT." ON)
|
||||
option(WITH_WINPR_TOOLS "Build WinPR helper binaries" ${TOOLS_DEFAULT})
|
||||
option(WITH_WINPR_DEPRECATED "Build WinPR deprecated symbols" OFF)
|
||||
option(WITH_DEBUG_THREADS "Print thread debug messages, enables handle dump" ${DEFAULT_DEBUG_OPTION})
|
||||
@ -110,11 +109,6 @@ if (WITH_WINPR_DEPRECATED)
|
||||
add_definitions(-DWITH_WINPR_DEPRECATED)
|
||||
endif()
|
||||
|
||||
if (WITH_VERBOSE_WINPR_ASSERT)
|
||||
add_definitions(-DWITH_VERBOSE_WINPR_ASSERT)
|
||||
endif()
|
||||
|
||||
|
||||
# Include cmake modules
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
|
@ -105,9 +105,10 @@ void CountdownEvent_AddCount(wCountdownEvent* countdown, size_t signalCount)
|
||||
WINPR_ASSERT(countdown);
|
||||
EnterCriticalSection(&countdown->lock);
|
||||
|
||||
const BOOL signalSet = countdown->count == 0;
|
||||
countdown->count += signalCount;
|
||||
|
||||
if (countdown->count > 0)
|
||||
if (signalSet)
|
||||
ResetEvent(countdown->event);
|
||||
|
||||
LeaveCriticalSection(&countdown->lock);
|
||||
|
@ -215,8 +215,12 @@ BOOL Queue_Enqueue(wQueue* queue, const void* obj)
|
||||
queue->array[queue->tail] = cnv.v;
|
||||
}
|
||||
queue->tail = (queue->tail + 1) % queue->capacity;
|
||||
|
||||
const BOOL signalSet = queue->size == 0;
|
||||
queue->size++;
|
||||
SetEvent(queue->event);
|
||||
|
||||
if (signalSet)
|
||||
SetEvent(queue->event);
|
||||
out:
|
||||
|
||||
Queue_Unlock(queue);
|
||||
|
Loading…
Reference in New Issue
Block a user