From 5ab2332addae2a90a1fa438c91e8069ebbfc4082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 30 Jan 2017 20:45:41 +0100 Subject: Cleanup repository I don't have enough time to implement everything so I am cutting losses. I might return to it later on, but now I push forward to implement at least base features. --- include/sys/mutex.h | 32 -------------------------------- include/sys/semaphore.h | 31 ------------------------------- 2 files changed, 63 deletions(-) delete mode 100644 include/sys/mutex.h delete mode 100644 include/sys/semaphore.h (limited to 'include/sys') diff --git a/include/sys/mutex.h b/include/sys/mutex.h deleted file mode 100644 index f682e02..0000000 --- a/include/sys/mutex.h +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include - -#include "../tasks.h" - -#ifndef _IOE_SYS_MUTEX_H_ -#define _IOE_SYS_MUTEX_H_ -#ifdef CONFIG_IOE_MUTEX - -#define MUTEX_F_TIMED (1<<0) -#define MUTEX_F_TAKEN (1<<7) -#define mutex_t volatile struct Mutex -struct Mutex { - uint8_t flags; - Task *_task_took; -}; -int8_t mutex_init(struct Mutex * mtx); -int8_t mutex_free(struct Mutex * mtx); -int8_t mutex_take(struct Mutex * mtx, uint16_t timeout); -int8_t mutex_give(struct Mutex * mtx); - -#else /* CONFIG_IOE_MUTEX */ - -#define mutex_t struct { } -#define mutex_init(MTX, FLAGS) -#define mutex_free(MTX) -#define mutex_take(MTX, TIMEOUT) -#define mutex_give(MTX); - -#endif /* CONFIG_IOE_MUTEX */ -#endif /* _IOE_SYS_MUTEX_H_ */ diff --git a/include/sys/semaphore.h b/include/sys/semaphore.h deleted file mode 100644 index 0a25af3..0000000 --- a/include/sys/semaphore.h +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -#ifndef _IOE_SYS_SEMAPHORE_H_ -#define _IOE_SYS_SEMAPHORE_H_ -#ifdef CONFIG_IOE_SEMAPHORE - -#define semaphore_t volatile struct Semaphore -struct Semaphore { - uint8_t flags; - uint8_t _count; - Task **_tasks; - uint8_t _tasks_len; -}; -int8_t semaphore_init(struct Semaphore * sem, uint8_t count); -int8_t semaphore_free(struct Semaphore * sem); -int8_t semaphore_take(struct Semaphore * sem, uint16_t timeout); -int8_t semaphore_give(Semaphore * sem); - -#else /* CONFIG_IOE_SEMAPHORE */ - -#define semaphore_t struct { } -// TODO implement for single processor -#define semaphore_init(SEM, FLAGS, COUNT) -#define semaphore_free(SEM) -#define semaphore_take(SEM, TIMEOUT) -#define semaphore_give(SEM) - -#endif /* CONFIG_IOE_SEMAPHORE */ -#endif /* _IOE_SYS_SEMAPHORE_H_ */ -- cgit v1.2.3