#line 380 "/home/travis/build/felix-lang/felix/src/packages/pthreads.fdoc"
  
  open class Semaphore
  {
    // FIXME: does not comply with GC friendly blocking protocol!
  
    requires package "pthread";
    type semaphore = "::flx::pthread::flx_semaphore_t*" requires semaphore_hxx;
    ctor semaphore = "new ::flx_pthread::flx_semaphore_t";
    ctor semaphore * int = "new ::flx_pthread::flx_semaphore_t($1)";
    proc destroy : semaphore = "delete $1;";
    proc post: semaphore = "$1->post();";
    proc wait: semaphore = "$1->wait();";
    gen trywait: semaphore -> int = "$1->trywait()";
    int get: semaphore = "$1->get();";
  }