17 #ifndef __TBB__aggregator_impl_H
18 #define __TBB__aggregator_impl_H
20 #include "../atomic.h"
21 #if !__TBBMALLOC_BUILD
22 #include "../tbb_profiling.h"
26 namespace interface6 {
32 template <
typename Derived>
48 template <
typename operation_type >
63 template <
typename handler_type >
64 void execute(operation_type *op, handler_type &handle_operations,
bool long_life_time =
true) {
69 const uintptr_t status = op->status;
81 op->next = res = pending_operations;
82 }
while (pending_operations.compare_and_swap(op, res) != res);
88 start_handle_operations(handle_operations);
95 __TBB_ASSERT(long_life_time,
"Waiting for an operation object that might be destroyed during processing.");
109 template <
typename handler_type >
111 operation_type *op_list;
133 op_list = pending_operations.fetch_and_store(NULL);
136 handle_operations(op_list);
143 template <
typename handler_type,
typename operation_type >
159 template<
typename aggregating_
class,
typename operation_list>
161 aggregating_class *
fi;
165 void operator()(operation_list* op_list) { fi->handle_operations(op_list); }
172 using interface6::internal::aggregated_operation;
173 using interface6::internal::aggregator_generic;
174 using interface6::internal::aggregator;
175 using interface6::internal::aggregating_functor;
180 #endif // __TBB__aggregator_impl_H