1

If I want to use pthread_mutex_t and pthread_spinlock_t in the multi-process environment, I have some questions below.

  1. Must I need to initialize the structure in the shared memory or use mmap()?
  2. If I initialize the structure in the shared-memory and set the attr PTHREAD_PROCESS_PRIVATE, what would happen?
nealchen
  • 11
  • 2

0 Answers0