阅读背景:

为什么POSIX mmap没有返回volatile void *?

来源:互联网 

Mmap returns a void*, but not a volatile void*. If I'm using mmap to map shared memory, then another process could be writing to that memory, which means two subsequent reads from the same memory location can yield different values -- the exact situation volatile is meant for. So why doesn't it return a volatile void*?.




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

分享到: