阅读背景:

共享内存:位置和锁定策略

来源:互联网 

I have a writer that creates a shared memory region, I'd like to ensure that readers fail to shm_open() the region until the writer is ready. My hacky way of doing this is writer will shm_open in read-only mode. Once the region is correctly constructed I chmod() the file. This is yucky, and I cannot fcntl() the file descriptor to change the permissions. Any suggestions (short of doing some awful sync in the region?)I have a writer that creates a shared memory re




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: