?? produce.c
字號:
#define __THREADS_MAIN#include <thread.h>#include <string>#include <iostream>extern "C" {# include <unistd.h>};using namespace std;using namespace cpp_threads;main(){ Cond t_control(attributes::process_shared_e); Mutex t_link(attributes::process_shared_e); 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 + -