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