After the previous test, Process a and Process Z diverge, each taking a separate code path, as if both came to a fork in the road and each took a distinct branch.
在上次测试之后,进程a和进程z会出现差异,每个进程会采用单独的代码路径,就像路上出现岔道,每一个都会走上不同的分枝。
Likewise, if the program communicates with the SPU code using mailbox access, it needs to create a new thread, for example, by calling fork or pthread_create.
同理,如果这个程序与使用邮箱访问的SPU代码进行通信,它就需要创建一个新的线程,例如通过调用fork或pthread_create。
In Listing 3, the PIDs are printed out at each step, and the code checks the return value from fork to determine which process is the parent and which is the child.
清单3在每个步骤打印出pid,并且该代码检查从fork返回的值来确定哪个进程是父进程,哪个进程是子进程。
应用推荐