1 #ifndef SUBORDINATION_API_HH 2 #define SUBORDINATION_API_HH 4 #include <subordination/config.hh> 5 #include <subordination/ppl/basic_factory.hh> 9 typedef SUBORDINATION_KERNEL_TYPE kernel;
17 template <Target t=Target::Local>
25 send<Local>(kernel* k) {
31 send<Remote>(kernel* k) {
32 factory.send_remote(k);
35 template<Target target=Target::Local>
37 upstream(kernel* lhs, kernel* rhs) {
42 template<Target target=Target::Local>
44 commit(kernel* rhs, exit_code ret) {
47 sbn::graceful_shutdown(static_cast<int>(ret));
49 rhs->return_to_parent(ret);
54 template<Target target=Target::Local>
57 exit_code ret = rhs->return_code();
60 ret == exit_code::undefined ? exit_code::success :
65 template<Target target=Target::Local>
67 send(kernel* lhs, kernel* rhs) {
76 ::sbn::factory.start();
81 ::sbn::factory.stop();
82 ::sbn::factory.wait();
87 template<
class Pipeline>
96 #endif // vim:filetype=cpp