ipc-bench icon indicating copy to clipboard operation
ipc-bench copied to clipboard

working version shm-sync

Open AlexBurnes opened this issue 6 years ago • 0 comments
trafficstars

fix two troubles with using pthread process shared

  1. need initialize mutex and condition variable only once at server process for example
  2. fix signal and wait functions on shared mutex and condition according to example in man https://linux.die.net/man/3/pthread_mutexattr_init section 'Process Shared Memory and Synchronization'

this solution has issue: client must start with some delay before server process is initilized shared segment and mutex, I insert sleep for a second in code

AlexBurnes avatar Oct 07 '19 12:10 AlexBurnes