Unverified Commit 6869e4ad authored by Dominik Charousset's avatar Dominik Charousset Committed by GitHub

Merge pull request #977

Fix pointed out typos
parents 324f1341 dcc96bfc
...@@ -92,50 +92,6 @@ private: ...@@ -92,50 +92,6 @@ private:
} }
}; };
/// @relates actor_storage
template <class T>
bool intrusive_ptr_upgrade_weak(actor_storage<T>* x) {
auto count = x->ctrl.strong_refs.load();
while (count != 0) {
if (x->ctrl.strong_refs.compare_exchange_weak(count, count + 1,
std::memory_order_relaxed))
return true;
}
return false;
}
/// @relates actor_storage
template <class T>
void intrusive_ptr_add_weak_ref(actor_storage<T>* x) {
x->ctrl.weak_refs.fetch_add(1, std::memory_order_relaxed);
}
/// @relates actor_storage
template <class T>
void intrusive_ptr_release_weak(actor_storage<T>* x) {
// destroy object if last weak pointer expires
if (x->ctrl.weak_refs == 1
|| x->ctrl.weak_refs.fetch_sub(1, std::memory_order_acq_rel) == 1)
delete x;
}
/// @relates actor_storage
template <class T>
void intrusive_ptr_add_ref(actor_storage<T>* x) {
x->ctrl.strong_refs.fetch_add(1, std::memory_order_relaxed);
}
/// @relates actor_storage
template <class T>
void intrusive_ptr_release(actor_storage<T>* x) {
// release implicit weak pointer if the last strong ref expires
// and destroy the data block
if (x->ctrl.strong_refs.fetch_sub(1, std::memory_order_acq_rel) == 1) {
x->destroy_data();
intrusive_ptr_relase_weak(x);
}
}
} // namespace caf } // namespace caf
#ifdef CAF_GCC #ifdef CAF_GCC
......
...@@ -217,7 +217,7 @@ public: ...@@ -217,7 +217,7 @@ public:
template <class Mutex, class CondVar> template <class Mutex, class CondVar>
bool synchronized_push_front(Mutex& mtx, CondVar& cv, unique_pointer ptr) { bool synchronized_push_front(Mutex& mtx, CondVar& cv, unique_pointer ptr) {
return synchronized_push_front(mtx, cv, ptr.relase()); return synchronized_push_front(mtx, cv, ptr.release());
} }
template <class Mutex, class CondVar, class... Ts> template <class Mutex, class CondVar, class... Ts>
......
...@@ -188,7 +188,7 @@ public: ...@@ -188,7 +188,7 @@ public:
} }
/// Acquires credit on an inbound path. The calculated credit to fill our /// Acquires credit on an inbound path. The calculated credit to fill our
/// queue fro two cycles is `desired`, but the manager is allowed to return /// queue for two cycles is `desired`, but the manager is allowed to return
/// any non-negative value. /// any non-negative value.
virtual int32_t acquire_credit(inbound_path* path, int32_t desired); virtual int32_t acquire_credit(inbound_path* path, int32_t desired);
......
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
} }
/// Acquires credit on an inbound path. The calculated credit to fill our /// Acquires credit on an inbound path. The calculated credit to fill our
/// queue fro two cycles is `desired`, but the driver is allowed to return /// queue for two cycles is `desired`, but the driver is allowed to return
/// any non-negative value. /// any non-negative value.
virtual int32_t acquire_credit(inbound_path* path, int32_t desired) { virtual int32_t acquire_credit(inbound_path* path, int32_t desired) {
CAF_IGNORE_UNUSED(path); CAF_IGNORE_UNUSED(path);
......
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
} }
/// Acquires credit on an inbound path. The calculated credit to fill our /// Acquires credit on an inbound path. The calculated credit to fill our
/// queue fro two cycles is `desired`, but the driver is allowed to return /// queue for two cycles is `desired`, but the driver is allowed to return
/// any non-negative value. /// any non-negative value.
virtual int32_t acquire_credit(inbound_path* path, int32_t desired) { virtual int32_t acquire_credit(inbound_path* path, int32_t desired) {
CAF_IGNORE_UNUSED(path); CAF_IGNORE_UNUSED(path);
......
...@@ -173,7 +173,7 @@ public: ...@@ -173,7 +173,7 @@ public:
return system().middleman(); return system().middleman();
} }
/// Adds the unitialized `scribe` instance `ptr` to this broker. /// Adds the uninitialized `scribe` instance `ptr` to this broker.
void add_scribe(scribe_ptr ptr); void add_scribe(scribe_ptr ptr);
/// Creates and assigns a new `scribe` from given native socked `fd`. /// Creates and assigns a new `scribe` from given native socked `fd`.
......
...@@ -89,7 +89,7 @@ echo "\ ...@@ -89,7 +89,7 @@ echo "\
This script expects to run at the root directory of a Git clone of CAF. This script expects to run at the root directory of a Git clone of CAF.
The current repository must be master. There must be no untracked file The current repository must be master. There must be no untracked file
and the working tree status must be equal to the current HEAD commit. and the working tree status must be equal to the current HEAD commit.
Further, the script expects a relase_note.md file in the current directory Further, the script expects a release_note.md file in the current directory
with the developer blog checked out one level above, i.e.: with the developer blog checked out one level above, i.e.:
\$HOME \$HOME
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment