freertos: release the generic version source code

freertos runs on the second core (small one) of the CPU
This commit is contained in:
carbon
2023-10-19 14:31:43 +08:00
parent e266c53351
commit ca03037500
2166 changed files with 694154 additions and 58149 deletions

View File

@ -0,0 +1,21 @@
#ifndef __SEMAPHORE_HEADER__
#define __SEMAPHORE_HEADER__
#include "linux/types.h"
#include "FreeRTOS_POSIX.h"
#include "FreeRTOS_POSIX/semaphore.h"
#define semaphore sem_internal
#define DEFINE_SEMAPHORE(name) \
struct sem_internal name;
void down(sem_internal_t *xsemaphore);
void up(sem_internal_t *xsemaphore);
int down_interruptible(sem_internal_t *sem);
static inline void sema_init(sem_internal_t *sem, int val)
{
sem_init(sem, NULL, val);
}
#endif