4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-21 12:33:32 +08:00
guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00

33 lines
649 B
C

#ifndef SUNXI_HAL_SEM_H
#define SUNXI_HAL_SEM_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <stddef.h>
#include <stdint.h>
#ifdef CONFIG_KERNEL_FREERTOS
#include <FreeRTOS.h>
#include <semphr.h>
typedef SemaphoreHandle_t hal_sem_t;
#else
#include <rtthread.h>
typedef rt_sem_t hal_sem_t;
#endif
hal_sem_t hal_sem_create(unsigned int cnt);
int hal_sem_delete(hal_sem_t sem);
int hal_sem_getvalue(hal_sem_t sem, int *val);
int hal_sem_post(hal_sem_t sem);
int hal_sem_timedwait(hal_sem_t sem, int ticks);
int hal_sem_trywait(hal_sem_t sem);
int hal_sem_wait(hal_sem_t sem);
int hal_sem_clear(hal_sem_t sem);
#ifdef __cplusplus
}
#endif
#endif