Searched refs:s_sem (Results 1 – 5 of 5) sorted by relevance
19 static sem_t* s_sem; variable63 s_sem = sem_open(semaphore_name, O_CREAT | O_EXCL, 0600, 1); in main()64 if (s_sem == SEM_FAILED) in main()90 if (s_do_mutual_exclusion) sem_wait(s_sem); in main()92 if (s_do_mutual_exclusion) sem_post(s_sem); in main()100 sem_close(s_sem); in main()114 if (s_do_mutual_exclusion) sem_wait(s_sem); in thread_func()116 if (s_do_mutual_exclusion) sem_post(s_sem); in thread_func()
19 static sem_t s_sem; variable56 sem_init(&s_sem, 0, 1); in main()77 if (s_do_mutual_exclusion) sem_wait(&s_sem); in main()79 if (s_do_mutual_exclusion) sem_post(&s_sem); in main()87 sem_destroy(&s_sem); in main()100 if (s_do_mutual_exclusion) sem_wait(&s_sem); in thread_func()102 if (s_do_mutual_exclusion) sem_post(&s_sem); in thread_func()
23 static sem_t s_sem; variable65 sem_wait(&s_sem); in thread_func()67 sem_post(&s_sem); in thread_func()69 sem_wait(&s_sem); in thread_func()71 sem_post(&s_sem); in thread_func()82 sem_init(&s_sem, 1); in main()90 assert(s_sem.value == 1); in main()91 sem_destroy(&s_sem); in main()
41 static sem_t* s_sem; variable81 sem_post(s_sem); in thread_func()112 s_sem = create_semaphore(semaphore_name); in main()122 sem_wait(s_sem); in main()123 sem_wait(s_sem); in main()124 destroy_semaphore(semaphore_name, s_sem); in main()125 s_sem = 0; in main()
18 static sem_t s_sem; variable23 sem_post(&s_sem); in increment_finished_count()53 sem_init(&s_sem, 0, 0); in main()81 sem_wait(&s_sem); in main()87 sem_destroy(&s_sem); in main()