Skip to content

Instantly share code, notes, and snippets.

@yifu
Created September 21, 2012 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yifu/3762185 to your computer and use it in GitHub Desktop.
Save yifu/3762185 to your computer and use it in GitHub Desktop.
#include <iostream>
#include "semaphore.h"
int main()
{
std::cout << "hello world" << std::endl;
sem_t temp;
const int result = sem_init( &temp, 0, 0 );
std::cout << " result = [" << result << "]" << std::endl;
::sem_open ("name",
O_CREAT,
ACE_DEFAULT_FILE_PERMS,
count);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment