- #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();
- t_control.wait(t_link);
- cout << "Consumed: '" << buf << "'n";
- t_link.unlock();
- }