fork download
  1. #include <iostream>
  2. #include <semaphore.h>
  3.  
  4. int sem_getvalue(sem_t *sem, int *sval);
  5. using namespace std;
  6.  
  7. int main() {
  8. // your code goes here
  9. sem_t c;
  10. int x = 0;
  11. sem_getvalue(&c , &x );
  12. cout << "yes";
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5520KB
stdin
Standard input is empty
stdout
yes