2つのプロセスを同期する方法に少し問題があります。最初のプロセスは共有メモリを作成し、次に2番目のプロセスが共有メモリをいっぱいにして最初のプロセスに信号を戻すのを待つ必要があります。最初のプロセスを待機させる方法がわかりません。
これが私のプロセスがどのように見えるかの擬似コードです:
プロセス1:
create shared memory
create a semaphore
wait for the second process /* this part i dont know how to write */
output the shared memory
プロセス2:
get shared memory id
get the semaphore id
wait();
fill the shared memory
signalize();