summaryrefslogtreecommitdiff
path: root/components/libc/pthreads/semaphore.h
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-10-17 17:19:12 -0400
committerMeco Man <[email protected]>2021-10-17 17:19:12 -0400
commitb513d37cf2fc33c2dd20021316533feaac0bef23 (patch)
treef14e24d145a40620dbb8fd5a5d807b972ec4a1d5 /components/libc/pthreads/semaphore.h
parent9fe546b0d86b17c64e57447913c8a9f3a9c40534 (diff)
[libc][posix] create 'posix' folder and move related files into it
Diffstat (limited to 'components/libc/pthreads/semaphore.h')
-rw-r--r--components/libc/pthreads/semaphore.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/components/libc/pthreads/semaphore.h b/components/libc/pthreads/semaphore.h
deleted file mode 100644
index 872226e385..0000000000
--- a/components/libc/pthreads/semaphore.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2010-10-26 Bernard the first version
- */
-
-#ifndef __POSIX_SEMAPHORE_H__
-#define __POSIX_SEMAPHORE_H__
-
-#include <rtthread.h>
-#include <pthread.h>
-
-struct posix_sem
-{
- /* reference count and unlinked */
- rt_uint16_t refcount;
- rt_uint8_t unlinked;
- rt_uint8_t unamed;
-
- /* RT-Thread semaphore */
- rt_sem_t sem;
-
- /* next posix semaphore */
- struct posix_sem* next;
-};
-typedef struct posix_sem sem_t;
-
-int sem_close(sem_t *sem);
-int sem_destroy(sem_t *sem);
-int sem_getvalue(sem_t *sem, int *sval);
-int sem_init(sem_t *sem, int pshared, unsigned int value);
-sem_t *sem_open(const char *name, int oflag, ...);
-int sem_post(sem_t *sem);
-int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
-int sem_trywait(sem_t *sem);
-int sem_unlink(const char *name);
-int sem_wait(sem_t *sem);
-
-#endif