Home
last modified time | relevance | path

Searched refs:sem_t (Results 1 – 24 of 24) sorted by relevance

/kernel/liteos_m/kal/libc/newlib/porting/include/
Dsemaphore.h42 #define SEM_FAILED ((sem_t *)0)
47 } sem_t; typedef
49 int sem_init(sem_t *sem, int shared, unsigned value);
50 int sem_destroy(sem_t *sem);
51 int sem_wait(sem_t *sem);
52 int sem_post(sem_t *sem);
53 int sem_timedwait(sem_t *__restrict sem, const struct timespec *__restrict timeout);
54 int sem_getvalue(sem_t *__restrict sem, int *__restrict currVal);
/kernel/liteos_m/testsuites/unittest/posix/src/semaphore/
Dsemaphore_func_test.c107 sem_t sem;
110 TEST_ASSERT_EQUAL_INT(0, sem_init((sem_t *)&sem, 0, 0));
114 if (sem_timedwait((sem_t *)&sem, &ts) == -1) {
126 TEST_ASSERT_EQUAL_INT(0, sem_destroy((sem_t *)&sem));
140 sem_t sem;
143 TEST_ASSERT_EQUAL_INT(0, sem_init((sem_t *)&sem, 0, 1));
148 int ret = sem_timedwait((sem_t *)&sem, &ts);
161 ret = sem_timedwait((sem_t *)&sem, &ts);
169 TEST_ASSERT_EQUAL_INT(0, sem_destroy((sem_t *)&sem));
182 sem_t sem;
[all …]
/kernel/liteos_a/compat/posix/src/
Dsemaphore.c39 int sem_init(sem_t *sem, int shared, unsigned int value) in sem_init()
60 int sem_destroy(sem_t *sem) in sem_destroy()
77 int sem_wait(sem_t *sem) in sem_wait()
95 int sem_trywait(sem_t *sem) in sem_trywait()
115 int sem_timedwait(sem_t *sem, const struct timespec *timeout) in sem_timedwait()
139 int sem_post(sem_t *sem) in sem_post()
156 int sem_getvalue(sem_t *sem, int *currVal) in sem_getvalue()
173 sem_t *sem_open(const char *name, int openFlag, ...) in sem_open()
181 int sem_close(sem_t *sem) in sem_close()
/kernel/liteos_m/kal/posix/src/
Dsemaphore.c68 int sem_init(sem_t *sem, int shared, unsigned int value) in sem_init()
91 int sem_destroy(sem_t *sem) in sem_destroy()
109 int sem_wait(sem_t *sem) in sem_wait()
127 int sem_post(sem_t *sem) in sem_post()
145 int sem_trywait(sem_t *sem) in sem_trywait()
163 int sem_timedwait(sem_t *sem, const struct timespec *timeout) in sem_timedwait()
192 int sem_getvalue(sem_t *sem, int *currVal) in sem_getvalue()
/kernel/liteos_a/testsuites/unittest/libc/posix/pthread/full/
DIt_posix_pthread_062.cpp36 sem_t *sem = (sem_t *)argument; in pthread_f01()
56 sem_t sem; in Testcase()
/kernel/linux/linux-5.10/tools/power/acpi/os_specific/service_layers/
Dosunixxf.c630 sem_t *sem; in acpi_os_create_semaphore()
653 sem = acpi_os_allocate(sizeof(sem_t)); in acpi_os_create_semaphore()
682 sem_t *sem = (sem_t *) handle; in acpi_os_delete_semaphore()
718 sem_t *sem = (sem_t *) handle; in acpi_os_wait_semaphore()
835 sem_t *sem = (sem_t *) handle; in acpi_os_signal_semaphore()
/kernel/liteos_m/testsuites/unittest/fuzz/src/semaphore/
Dsem_timedwait_fuzz.c54 sem_t sem; in SemTimedWaitFuzzTest()
68 (void)memset_s(&sem, sizeof(sem), 0, sizeof(sem_t)); in SemTimedWaitFuzzTest()
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/ptrace/
Dchild.h17 sem_t sem_parent;
23 sem_t sem_child;
/kernel/liteos_a/fs/vfs/operation/
Dvfs_procfd.c349 static struct fd_table_s *GetProcessFTable(unsigned int pid, sem_t *semId) in GetProcessFTable()
381 sem_t semId; in CopyFdToProc()
433 sem_t semId; in CloseProcFd()
/kernel/liteos_a/fs/include/fs/
Dfd_table.h50 sem_t ft_sem; /* manage access to the file table */
/kernel/liteos_a/apps/shell/include/
Dshell.h80 sem_t shellSem;
/kernel/liteos_a/testsuites/kernel/sample/posix/mutex/full/
DIt_posix_mutex_059.c46 sem_t sem; in Testcase()
DIt_posix_mutex_038.c41 static sem_t g_sem038;
DIt_posix_mutex_079.c41 static sem_t g_sem079;
DIt_posix_mutex_022.c41 static sem_t g_semA, g_semB;
DIt_posix_mutex_075.c41 static sem_t g_sem075;
DIt_posix_mutex_074.c41 static sem_t g_sem074;
/kernel/liteos_a/testsuites/unittest/libc/posix/pthread/
DIt_posix_pthread.h180 sem_t sem;
209 extern sem_t g_pthreadSem1;
210 extern sem_t g_pthreadSem2;
Dposix_pthread_test.cpp61 sem_t g_pthreadSem1;
62 sem_t g_pthreadSem2;
/kernel/liteos_a/testsuites/kernel/sample/posix/mutex/smoke/
DIt_posix_mutex_019.c41 static sem_t g_semA, g_semB;
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/
Dset_memory_region_test.c41 static sem_t vcpu_ready;
/kernel/liteos_a/testsuites/kernel/sample/posix/pthread/
DIt_posix_pthread.h173 sem_t sem;
/kernel/linux/linux-5.10/tools/perf/
Dbuiltin-sched.c69 sem_t sleep_sem;
71 sem_t ready_for_work;
72 sem_t work_done_sem;
90 sem_t *wait_sem;
/kernel/linux/linux-5.10/tools/testing/selftests/seccomp/
Dseccomp_bpf.c2442 sem_t *started;
2471 sem_t started; in FIXTURE()