36 #ifndef FIX8_FF_WRAPPER_HPP_
37 #define FIX8_FF_WRAPPER_HPP_
62 {
return _queue.push(
new (::ff::ff_malloc(
sizeof(T))) T(source)); }
64 bool try_pop(T* &target) {
return _queue.pop(reinterpret_cast<void**>(&target)); }
67 #if defined FIX8_SLEEP_NO_YIELD
68 const unsigned cnt_rnd(3);
75 #if defined FIX8_SLEEP_NO_YIELD
76 if ((++cnt %= cnt_rnd) == 0)
85 void release(T *source)
const { ::ff::ff_free(source); }
106 bool try_push(T *source) {
return _queue.push(source); }
107 void push(T *source) { try_push(source); }
108 bool try_pop(T* &target) {
return _queue.pop(reinterpret_cast<void**>(&target)); }
111 #if defined FIX8_SLEEP_NO_YIELD
112 const unsigned cnt_rnd(3);
119 #if defined FIX8_SLEEP_NO_YIELD
120 if ((++cnt %= cnt_rnd) == 0)
135 #endif // FIX8_FF_WRAPPER_HPP_
ff::uMPMC_Ptr_Queue _queue
void push(const T &source)
void release(T *source) const
bool try_push(const T &source)
ff::uMPMC_Ptr_Queue _queue
const T & const_reference
Const reference type.
T & reference
Reference type.
const T & const_reference
Const reference type.
T & reference
Reference type.
int hypersleep< h_nanoseconds >(unsigned amt)