summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2013-01-04 04:22:42 (EST)
committerThomas Schuetz2013-01-04 04:22:42 (EST)
commitec0a83ccb44871498c61260c961a911ec2663531 (patch)
tree8b33e00ce692fa01befa7e460eb5137aae79a3ce
parent79a0e2b3c89bc76732d30fd1aa22bb38ba008394 (diff)
downloadorg.eclipse.etrice-ec0a83ccb44871498c61260c961a911ec2663531.zip
org.eclipse.etrice-ec0a83ccb44871498c61260c961a911ec2663531.tar.gz
org.eclipse.etrice-ec0a83ccb44871498c61260c961a911ec2663531.tar.bz2
[runtime.c] first changes for multi threading and physical model
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/doc/physical-mapping.txt8
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/model/Types.room21
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h5
4 files changed, 35 insertions, 1 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/doc/physical-mapping.txt b/examples/org.eclipse.etrice.generator.c.reference/doc/physical-mapping.txt
new file mode 100644
index 0000000..db85f87
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/doc/physical-mapping.txt
@@ -0,0 +1,8 @@
+- queue1: MESSAGE_BLOCK_SIZE, MESSAGE_POOL_MAX
+- queue2: heapsize, number of buffers
+// - move threads to NodeRef
+- prio min max
+
+
+TODO:
+rename SubSysDisp -> NodeINstance_Disp.h \ No newline at end of file
diff --git a/examples/org.eclipse.etrice.generator.c.reference/model/Types.room b/examples/org.eclipse.etrice.generator.c.reference/model/Types.room
new file mode 100644
index 0000000..fd87e44
--- /dev/null
+++ b/examples/org.eclipse.etrice.generator.c.reference/model/Types.room
@@ -0,0 +1,21 @@
+RoomModel room.basic.types {
+
+ PrimitiveType boolean: ptBoolean -> boolean default "FALSE"
+ PrimitiveType char: ptCharacter -> char default "0"
+ PrimitiveType int8: ptInteger -> int8 default "0"
+ PrimitiveType int16: ptInteger -> int16 default "0"
+ PrimitiveType int32: ptInteger -> int32 default "0"
+ PrimitiveType int64: ptInteger -> int64 default "0"
+
+ PrimitiveType uint8: ptInteger -> uint8 default "0"
+ PrimitiveType uint16: ptInteger -> uint16 default "0"
+ PrimitiveType uint32: ptInteger -> uint32 default "0"
+ PrimitiveType uint64: ptInteger -> uint64 default "0"
+
+ PrimitiveType float32:ptReal -> float32 default "0"
+ PrimitiveType float64:ptReal -> float64 default "0"
+
+ // TODO: define strings for C
+ PrimitiveType charPtr:ptCharacter -> charPtr default "0"
+ PrimitiveType string:ptCharacter -> charPtr default "0"
+} \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h b/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
index b1759ab..9ae2781 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
@@ -29,5 +29,7 @@
#define MESSAGE_POOL_MAX 50
#define MESSAGE_BLOCK_SIZE 64
+/* enable multi threading (e.g. for protection of message queues) */
+#define ET_MULTI_THREADING
#endif /* ETGLOBALFLAGS_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h
index 07b6a7b..10c4e98 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etDatatypes.h
@@ -78,11 +78,14 @@ typedef uint8 etUInt8;
typedef uint16 etUInt16;
typedef uint32 etUInt32;
-typedef bool etBool;
+typedef charPtr etCharPtr;
typedef float32 etFloat32;
typedef float64 etFloat64;
+typedef bool etBool;
+
+
typedef FILE* etFileHandle;
typedef int8 etAddressId;