From e99ecd9ffdbc2fe02d18794f736405c7a0337cdb Mon Sep 17 00:00:00 2001 From: Ryan Zoeller Date: Fri, 18 Oct 2024 00:18:25 -0500 Subject: [PATCH] [librtpi] include condition_variable.hpp fix (#41601) --- ...-fix-wait_until-predicate-evaluation.patch | 26 +++++++++++++++++++ ports/librtpi/portfile.cmake | 2 ++ ports/librtpi/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/l-/librtpi.json | 5 ++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 ports/librtpi/condition_variable-fix-wait_until-predicate-evaluation.patch diff --git a/ports/librtpi/condition_variable-fix-wait_until-predicate-evaluation.patch b/ports/librtpi/condition_variable-fix-wait_until-predicate-evaluation.patch new file mode 100644 index 0000000000..77e20feef6 --- /dev/null +++ b/ports/librtpi/condition_variable-fix-wait_until-predicate-evaluation.patch @@ -0,0 +1,26 @@ +From 75409d8ec67146e0c245316cb564aed5ffda5041 Mon Sep 17 00:00:00 2001 +From: Ryan Zoeller +Date: Fri, 30 Aug 2024 10:51:27 -0500 +Subject: [PATCH] condition_variable: fix wait_until predicate evaluation + +Signed-off-by: Ryan Zoeller +--- + src/rtpi/condition_variable.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rtpi/condition_variable.hpp b/src/rtpi/condition_variable.hpp +index 9041ab7..6fd82d8 100644 +--- a/src/rtpi/condition_variable.hpp ++++ b/src/rtpi/condition_variable.hpp +@@ -185,7 +185,7 @@ class condition_variable { + const std::chrono::time_point &timeout_time, + Predicate stop_waiting) + { +- while (!stop_waiting) { ++ while (!stop_waiting()) { + if (wait_until(lock, timeout_time) == + cv_status::timeout) + return stop_waiting(); +-- +2.43.5 + diff --git a/ports/librtpi/portfile.cmake b/ports/librtpi/portfile.cmake index a7accf3957..e405109330 100644 --- a/ports/librtpi/portfile.cmake +++ b/ports/librtpi/portfile.cmake @@ -5,6 +5,8 @@ vcpkg_from_gitlab( REF "${VERSION}" SHA512 fb0cdd14f3c94f610fc153154ea09d5cfd7d3def16bdaabf8c2b4e0a8b7fa8ddec4cde6ae0b8726d58ee4a773df5c4f13002e565fb06ad3c8e9731a45122704f HEAD_REF main + PATCHES + condition_variable-fix-wait_until-predicate-evaluation.patch ) vcpkg_configure_make( diff --git a/ports/librtpi/vcpkg.json b/ports/librtpi/vcpkg.json index 0802430c2c..8735bc25e9 100644 --- a/ports/librtpi/vcpkg.json +++ b/ports/librtpi/vcpkg.json @@ -1,6 +1,7 @@ { "name": "librtpi", "version": "1.0.0", + "port-version": 1, "description": "The Real-Time Priority Inheritance Library (librtpi) is intended to bridge the gap between the glibc pthread implementation and a functionally correct priority inheritance for pthread locking primitives, such as pthread_mutex and pthread_condvar.", "homepage": "https://gitlab.com/linux-rt/librtpi", "license": "LGPL-2.1-only", diff --git a/versions/baseline.json b/versions/baseline.json index a2fe18d8b0..930b3b859a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5018,7 +5018,7 @@ }, "librtpi": { "baseline": "1.0.0", - "port-version": 0 + "port-version": 1 }, "librttopo": { "baseline": "1.1.0", diff --git a/versions/l-/librtpi.json b/versions/l-/librtpi.json index 3fe2b9baec..b23bb4e761 100644 --- a/versions/l-/librtpi.json +++ b/versions/l-/librtpi.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a224c4751a43ecde77210db70bc9f0b233a1b9c0", + "version": "1.0.0", + "port-version": 1 + }, { "git-tree": "ccd041402709075b83bb6a23ff2c85ce6c8358ac", "version": "1.0.0",