Skip to content

Commit

Permalink
[librtpi] include condition_variable.hpp fix (#41601)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtzoeller authored Oct 18, 2024
1 parent 2b47fbf commit e99ecd9
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 75409d8ec67146e0c245316cb564aed5ffda5041 Mon Sep 17 00:00:00 2001
From: Ryan Zoeller <[email protected]>
Date: Fri, 30 Aug 2024 10:51:27 -0500
Subject: [PATCH] condition_variable: fix wait_until predicate evaluation

Signed-off-by: Ryan Zoeller <[email protected]>
---
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<Clock, Duration> &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

2 changes: 2 additions & 0 deletions ports/librtpi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions ports/librtpi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5018,7 +5018,7 @@
},
"librtpi": {
"baseline": "1.0.0",
"port-version": 0
"port-version": 1
},
"librttopo": {
"baseline": "1.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/librtpi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a224c4751a43ecde77210db70bc9f0b233a1b9c0",
"version": "1.0.0",
"port-version": 1
},
{
"git-tree": "ccd041402709075b83bb6a23ff2c85ce6c8358ac",
"version": "1.0.0",
Expand Down

0 comments on commit e99ecd9

Please sign in to comment.