📄 produce.c
字号:
#define __THREADS_MAIN#include <thread.h>#include <string>extern "C" {# include <unistd.h>};main(){ cond t_control(attributes::process_shared); mutex t_link(attributes::process_shared); char *buf = (char *)pthread::shalloc(80); t_link.lock(); cout << "Enter text for consumer: "; cout.flush(); cin.getline(buf,80); t_control.signal(); t_link.unlock();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -