| 3975 | |
| 3976 | |
| 3977 | UPID spawn(ProcessBase* process, bool manage) |
| 3978 | { |
| 3979 | process::initialize(); |
| 3980 | |
| 3981 | if (process != nullptr) { |
| 3982 | // If using a manual clock, try and set current time of process |
| 3983 | // using happens before relationship between spawner (__process__) |
| 3984 | // and spawnee (process)! |
| 3985 | if (Clock::paused()) { |
| 3986 | Clock::update(process, Clock::now(__process__)); |
| 3987 | } |
| 3988 | |
| 3989 | return process_manager->spawn(process, manage); |
| 3990 | } else { |
| 3991 | return UPID(); |
| 3992 | } |
| 3993 | } |
| 3994 | |
| 3995 | |
| 3996 | void terminate(const UPID& pid, bool inject) |