From 3af57a9dac461e3f0e9bb00704ba182ceedabf80 Mon Sep 17 00:00:00 2001 From: bthomee Date: Tue, 23 Sep 2025 04:29:18 -0700 Subject: [PATCH] deploy: 73ff54143d0a9b378cf3612b9ba9ac3751928551 --- Workers_8cpp_source.html | 2 +- classripple_1_1basic__semaphore.html | 18 ++-- namespaceripple.html | 17 +++- semaphore_8h_source.html | 142 +++++++++++++-------------- 4 files changed, 96 insertions(+), 83 deletions(-) diff --git a/Workers_8cpp_source.html b/Workers_8cpp_source.html index 3066dd4d62..d7fc910376 100644 --- a/Workers_8cpp_source.html +++ b/Workers_8cpp_source.html @@ -417,7 +417,7 @@ $(document).ready(function() { init_codefold(0); });
std::atomic< int > m_runningTaskCount
Definition Workers.h:231
semaphore m_semaphore
Definition Workers.h:226
void setNumberOfThreads(int numberOfThreads)
Set the desired number of threads.
Definition Workers.cpp:64
-
void notify()
Increment the count and unblock one waiting thread.
Definition semaphore.h:48
+
void notify()
Increment the count and unblock one waiting thread.
Definition semaphore.h:76
Singleton class that maintains performance counters and optionally writes Json-formatted data to a di...
Definition PerfLog.h:52
virtual void resizeJobs(int const resize)=0
Ensure enough room to store each currently executing job.
T join(T... args)
diff --git a/classripple_1_1basic__semaphore.html b/classripple_1_1basic__semaphore.html index 2de12f8a8d..12c25ba551 100644 --- a/classripple_1_1basic__semaphore.html +++ b/classripple_1_1basic__semaphore.html @@ -126,7 +126,7 @@ Private Attributes

Detailed Description

template<class Mutex, class CondVar>
class ripple::basic_semaphore< Mutex, CondVar >
-

Definition at line 29 of file semaphore.h.

+

Definition at line 57 of file semaphore.h.

Member Typedef Documentation

◆ size_type

@@ -142,7 +142,7 @@ template<class Mutex , class CondVar >
-

Definition at line 37 of file semaphore.h.

+

Definition at line 65 of file semaphore.h.

@@ -176,7 +176,7 @@ template<class Mutex , class CondVar >

Create the semaphore, with an optional initial count.

If unspecified, the initial count is zero.

-

Definition at line 42 of file semaphore.h.

+

Definition at line 70 of file semaphore.h.

@@ -200,7 +200,7 @@ template<class Mutex , class CondVar >

Increment the count and unblock one waiting thread.

-

Definition at line 48 of file semaphore.h.

+

Definition at line 76 of file semaphore.h.

@@ -223,7 +223,7 @@ template<class Mutex , class CondVar >

Block until notify is called.

-

Definition at line 57 of file semaphore.h.

+

Definition at line 85 of file semaphore.h.

@@ -247,7 +247,7 @@ template<class Mutex , class CondVar >

Perform a non-blocking wait.

Returns
true If the wait would be satisfied.
-

Definition at line 69 of file semaphore.h.

+

Definition at line 97 of file semaphore.h.

@@ -274,7 +274,7 @@ template<class Mutex , class CondVar >
-

Definition at line 32 of file semaphore.h.

+

Definition at line 60 of file semaphore.h.

@@ -300,7 +300,7 @@ template<class Mutex , class CondVar >
-

Definition at line 33 of file semaphore.h.

+

Definition at line 61 of file semaphore.h.

@@ -326,7 +326,7 @@ template<class Mutex , class CondVar >
-

Definition at line 34 of file semaphore.h.

+

Definition at line 62 of file semaphore.h.

diff --git a/namespaceripple.html b/namespaceripple.html index 3a4fb2fa63..67d2eeda60 100644 --- a/namespaceripple.html +++ b/namespaceripple.html @@ -6250,8 +6250,21 @@ Variables

Detailed Description

Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.

Callback for filtering SHAMap during sync.

+

TODO: Remove ripple::basic_semaphore (and this file) and use std::counting_semaphore.

Use hardened_hash_* containers for keys that do need a secure hashing algorithm.

-

The cryptographic security of containers where a hash function is used as a template parameter depends entirely on that hash function and not at all on what container it is.

+

The cryptographic security of containers where a hash function is used as a template parameter depends entirely on that hash function and not at all on what container it is.

+

Background:

+

GCC: According to GCC Bugzilla PR104928 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928#c15), the fix is scheduled for inclusion in GCC 16.0 (see comment #15, Target Milestone: 16.0). It is not included in GCC 14.x or earlier, and there is no indication that it will be backported to GCC 13.x or 14.x branches.

+

Clang: The fix for is included in Clang 19.1.0+

+

Once the minimum compiler version is updated to > GCC 16.0 or Clang 19.1.0, we can remove this file.

+

WARNING: Avoid using std::counting_semaphore until the minimum compiler version is updated.

Typedef Documentation

◆ uint128

@@ -8178,7 +8191,7 @@ template<class T >
-

Definition at line 79 of file semaphore.h.

+

Definition at line 107 of file semaphore.h.

diff --git a/semaphore_8h_source.html b/semaphore_8h_source.html index 0ff5463f63..c08cb65b70 100644 --- a/semaphore_8h_source.html +++ b/semaphore_8h_source.html @@ -100,80 +100,80 @@ $(document).ready(function() { init_codefold(0); });
17*/
18//==============================================================================
19
-
20#ifndef RIPPLE_CORE_SEMAPHORE_H_INCLUDED
-
21#define RIPPLE_CORE_SEMAPHORE_H_INCLUDED
-
22
-
23#include <condition_variable>
-
24#include <mutex>
-
25
-
26namespace ripple {
-
27
-
28template <class Mutex, class CondVar>
-
- -
30{
-
31private:
-
32 Mutex m_mutex;
-
33 CondVar m_cond;
- -
35
-
36public:
- -
38
-
-
42 explicit basic_semaphore(size_type count = 0) : m_count(count)
-
43 {
-
44 }
+
48#ifndef RIPPLE_CORE_SEMAPHORE_H_INCLUDED
+
49#define RIPPLE_CORE_SEMAPHORE_H_INCLUDED
+
50
+
51#include <condition_variable>
+
52#include <mutex>
+
53
+
54namespace ripple {
+
55
+
56template <class Mutex, class CondVar>
+
+ +
58{
+
59private:
+
60 Mutex m_mutex;
+
61 CondVar m_cond;
+ +
63
+
64public:
+ +
66
+
+
70 explicit basic_semaphore(size_type count = 0) : m_count(count)
+
71 {
+
72 }
-
45
-
47 void
-
- -
49 {
- -
51 ++m_count;
-
52 m_cond.notify_one();
-
53 }
+
73
+
75 void
+
+ +
77 {
+ +
79 ++m_count;
+
80 m_cond.notify_one();
+
81 }
-
54
-
56 void
-
- -
58 {
- -
60 while (m_count == 0)
-
61 m_cond.wait(lock);
-
62 --m_count;
-
63 }
-
-
64
-
68 bool
-
- -
70 {
- -
72 if (m_count == 0)
-
73 return false;
-
74 --m_count;
-
75 return true;
-
76 }
-
-
77};
-
-
78
- -
80
-
81} // namespace ripple
82
-
83#endif
- - - -
void wait()
Block until notify is called.
Definition semaphore.h:57
-
basic_semaphore(size_type count=0)
Create the semaphore, with an optional initial count.
Definition semaphore.h:42
-
bool try_wait()
Perform a non-blocking wait.
Definition semaphore.h:69
- -
void notify()
Increment the count and unblock one waiting thread.
Definition semaphore.h:48
+
84 void
+
+ +
86 {
+ +
88 while (m_count == 0)
+
89 m_cond.wait(lock);
+
90 --m_count;
+
91 }
+
+
92
+
96 bool
+
+ +
98 {
+ +
100 if (m_count == 0)
+
101 return false;
+
102 --m_count;
+
103 return true;
+
104 }
+
+
105};
+
+
106
+ +
108
+
109} // namespace ripple
+
110
+
111#endif
+ + + +
void wait()
Block until notify is called.
Definition semaphore.h:85
+
basic_semaphore(size_type count=0)
Create the semaphore, with an optional initial count.
Definition semaphore.h:70
+
bool try_wait()
Perform a non-blocking wait.
Definition semaphore.h:97
+ +
void notify()
Increment the count and unblock one waiting thread.
Definition semaphore.h:76