1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 18 unchanged lines hidden (view full) --- 27 * Authors: Gabe Black 28 */ 29 30#ifndef __SYSTEMC_EXT_CORE_SC_SPAWN_HH__ 31#define __SYSTEMC_EXT_CORE_SC_SPAWN_HH__ 32 33#include <vector> 34 |
35#include "sc_join.hh" |
36#include "sc_process_handle.hh" 37 38namespace sc_core 39{ 40 41class sc_spawn_options; 42 43} // namespace sc_core --- 118 unchanged lines hidden (view full) --- 162#define sc_ref(r) boost::ref(r) 163#define sc_cref(r) boost::cref(r) 164 165#define SC_FORK \ 166{ \ 167 ::sc_core::sc_process_handle forkees[] = { 168 169#define SC_JOIN \ |
170 }; \ 171 ::sc_core::sc_join join; \ 172 for (int i = 0; i < sizeof(forkees) / sizeof(forkees[0]); i++) \ 173 join.add_process(forkees[i]); \ 174 join.wait(); \ |
175} 176 177// Non-standard |
178#define SC_CJOIN \ 179 }; \ 180 ::sc_core::sc_join join; \ 181 for (int i = 0; i < sizeof(forkees) / sizeof(forkees[0]); i++) \ 182 join.add_process(forkees[i]); \ 183 join.wait_clocked(); \ 184} |
185 |
186 |
187} // namespace sc_core 188 189namespace sc_unnamed 190{ 191 192typedef int ImplementationDefined; 193extern ImplementationDefined _1; 194extern ImplementationDefined _2; 195extern ImplementationDefined _3; 196extern ImplementationDefined _4; 197extern ImplementationDefined _5; 198extern ImplementationDefined _6; 199extern ImplementationDefined _7; 200extern ImplementationDefined _8; 201extern ImplementationDefined _9; 202 203} // namespace sc_unnamed 204 205#endif //__SYSTEMC_EXT_CORE_SC_SPAWN_HH__ |