• Home
  • Raw
  • Download

Lines Matching refs:semaphore

17   semaphore_t* semaphore;  member
26 CHECK(helper->semaphore); in sleep_then_increment_counter()
29 semaphore_post(helper->semaphore); in sleep_then_increment_counter()
36 semaphore_t* semaphore = semaphore_new(0); in TEST_F() local
37 ASSERT_TRUE(semaphore != NULL); in TEST_F()
38 semaphore_free(semaphore); in TEST_F()
42 semaphore_t* semaphore = semaphore_new(3); in TEST_F() local
43 ASSERT_TRUE(semaphore != NULL); in TEST_F()
45 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()
46 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()
47 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()
48 EXPECT_FALSE(semaphore_try_wait(semaphore)); in TEST_F()
50 semaphore_free(semaphore); in TEST_F()
54 semaphore_t* semaphore = semaphore_new(0); in TEST_F() local
55 ASSERT_TRUE(semaphore != NULL); in TEST_F()
57 EXPECT_FALSE(semaphore_try_wait(semaphore)); in TEST_F()
58 semaphore_post(semaphore); in TEST_F()
59 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()
60 EXPECT_FALSE(semaphore_try_wait(semaphore)); in TEST_F()
62 semaphore_free(semaphore); in TEST_F()
66 semaphore_t* semaphore = semaphore_new(0); in TEST_F() local
67 ASSERT_TRUE(semaphore != NULL); in TEST_F()
68 semaphore_post(semaphore); in TEST_F()
69 semaphore_wait(semaphore); in TEST_F()
70 semaphore_free(semaphore); in TEST_F()
74 semaphore_t* semaphore = semaphore_new(0); in TEST_F() local
75 ASSERT_TRUE(semaphore != NULL); in TEST_F()
80 EXPECT_FALSE(semaphore_try_wait(semaphore)); in TEST_F()
81 SemaphoreTestSequenceHelper sequence_helper = {semaphore, 0}; in TEST_F()
84 semaphore_wait(semaphore); in TEST_F()
88 semaphore_free(semaphore); in TEST_F()