C 98 Mutex中共享数组的锁定变量
Locking variables for shared array in C++98 mutex
我是Mutex想法的新手,但是需要在两个过程之间进行共享数组的锁定控制。
我发现的唯一的C 教程对我来说是有意义的,以了解Mutex实现的使用显示#include <mutex>
的使用,这将失败给出错误:/usr/include/c++/4.6/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
有没有办法在任何一个简单的可读取的非2011-标准c中进行此操作或C ?
C 在2011年之前既没有任何多线程的概念。在C11或C 11。
相关文章:
- 如何创建一个CMake变量,除非显式重写,否则使用默认值
- 将成员变量添加到共享库中的类中,不会破坏二进制兼容性吗
- 如何杀死被条件变量锁定的线程?
- 使用文件锁定的进程之间的条件变量
- 托管语言是否锁定本机库的刷新和重新加载变量?
- 信号在条件变量上而无需锁定锁
- 为什么条件变量需要锁定(因此也需要静音)
- C 98 Mutex中共享数组的锁定变量
- 带条件变量的升压锁定机制
- 在更新期间提升锁定变量矢量
- 在C++Builder 10中加载DLL时,变量或安全数组被锁定
- C++:Boost::互斥锁分别锁定同一作用域中的多个变量
- pthread互斥锁定和解锁每个变量
- 如果我锁定变量,我是否必须将复杂类型标记为“易失性”?
- 自动锁定自由更新2个变量
- thread_local变量需要使用互斥锁来锁定
- 如何避免互斥变量被同一线程锁定两次
- 如果我只需要变量在其他线程中的值,我应该在一个线程中锁定变量吗?如果我不需要它为什么它有效?
- 快速锁定大量读取的变量,这些变量可能偶尔从另一个线程更改
- 我可以同时锁定多个变量吗?