Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h
index 3402f1790..66d56c894 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etPlatform.h
@@ -23,23 +23,55 @@
/* platform specific functions */
/******************thread********************/
-void etThread_construct(etThread* self, const etThreadname name, void (*func)(void *), etStacksize stacksize, etPriority prio);
+
+typedef int32 etStacksize;
+typedef int32 etPriority;
+typedef charPtr etThreadname;
+typedef void (*etThreadFunction)(void *);
+
+typedef struct etThread{
+ etOSThreadData osData; /* OS specific thread data (e.g. handle or id) */
+ etStacksize stacksize;
+ etPriority priority;
+ etThreadname threadName;
+ etThreadFunction threadFunction;
+ void* threadFunctionData;
+} etThread;
+
+
+void etThread_construct(etThread* self);
void etThread_destruct(etThread* self);
+/******************thread helpers********************/
+void etThread_sleep(etInt32 millis);
+
+
/*****************mutex**********************/
+
+typedef struct etMutex {
+ etOSMutexData osData;
+} etMutex;
+
void etMutex_construct(etMutex* self);
void etMutex_destruct(etMutex* self);
void etMutex_enter(etMutex* self);
void etMutex_leave(etMutex* self);
/********************semaphore****************/
-void etSema_contruct(etSema* self);
+
+typedef struct etSema {
+ etOSSemaData osData;
+} etSema;
+
+void etSema_construct(etSema* self);
void etSema_destruct(etSema* self);
void etSema_wakeup(etSema* self);
void etSema_waitForWakeup(etSema* self);
/*********************************************/
+
+
/*
* Platform startup and shutdown -> generated code for SubSystemClass uses these interfaces
* */

Back to the top