阅读背景:

在共享内存上分配原子

来源:互联网 

I am trying to allocate a atomic on a shared memory block (on linux). The atomic will be accessed and modified my multiple threads simultaneously. The rational behind allocating it on shared memory is because I want to persist the values so if my process is restarted the previous state can be recovered. I know for a fact if i use a mutex in shared memory i have to initialize it as a SHARED. Is there any such requirement for atomics? Is this feasible? I am trying to allocate a atomic on a shared me




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

分享到: