sem1.C
Upload User: shtangtang
Upload Date: 2007-01-04
Package Size: 167k
Code Size: 0k
Development Platform:

Unix_Linux

  1. #include <thread.h>
  2. #include <thread_semaphore.h>
  3. main()
  4. {
  5.   pthread::set_project( "/tmp/sematest" );
  6.   semaphore sem(attributes::process_shared);
  7.   sem.wait();
  8.   cout << "Got signal from semaphore.." << endl;
  9. }