For shmget() prohibbits simutaneous initializations of a block of memory area, one does not have to rely on pthread_once() to get the GlobalMutex therein initialized instead of taking advantage of...
Type: Posts; User: cjrcl
For shmget() prohibbits simutaneous initializations of a block of memory area, one does not have to rely on pthread_once() to get the GlobalMutex therein initialized instead of taking advantage of...
ftok() may return key in "int shmget(key_t key, int size, int shmflg);".
BTW, PTHREAD_PROCESS_SHARED and PTHREAD_MUTEX_RECURSIVE are mutually exclusive.