Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-11-05 11:32:46 -0500
committerHenrik Rentz-Reichert2012-11-05 11:32:46 -0500
commit4b9e43bf8d4e651431a3129cb7a01d3671e8d896 (patch)
tree50e9d9d1dbc8671b8871ad551939185cda26f9d9
parent89b829cb81af40cc0f819c8e1390a0b054877778 (diff)
downloadorg.eclipse.etrice-4b9e43bf8d4e651431a3129cb7a01d3671e8d896.tar.gz
org.eclipse.etrice-4b9e43bf8d4e651431a3129cb7a01d3671e8d896.tar.xz
org.eclipse.etrice-4b9e43bf8d4e651431a3129cb7a01d3671e8d896.zip
[runtime.c] fixes in new base package
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.c10
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.h8
7 files changed, 14 insertions, 14 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory.h b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory.h
index a7c96fc8f..32683d8dd 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory.h
@@ -38,7 +38,7 @@ typedef void etMemory_free(struct etMemory* heap, void* obj, etUInt16 size);
typedef struct etMemory {
/** size of the heap in bytes */
- etUInt16 size;
+ etUInt32 size;
etMemory_alloc* alloc;
etMemory_free* free;
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.c b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.c
index b0dfe4a6d..2bb385725 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.c
@@ -56,7 +56,7 @@ void etMemory_FixedSize_free(etMemory* heap, void* obj, etUInt16 size) {
/*
* the public interface
*/
-etMemory* etMemory_FixedSize_init(void* heap, etUInt16 size, etUInt16 blockSize) {
+etMemory* etMemory_FixedSize_init(void* heap, etUInt32 size, etUInt16 blockSize) {
etFixedSizeMemory* self = (etFixedSizeMemory*) heap;
size_t data_size = CEIL_ALIGN(sizeof(etFixedSizeMemory));
int i;
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
index c804f254d..eb037e92a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FixedSize.h
@@ -25,6 +25,6 @@
*
* \return the pointer to the initialized etMemory struct
*/
-etMemory* etMemory_FixedSize_init(void* heap, etUInt16 size, etUInt16 blockSize);
+etMemory* etMemory_FixedSize_init(void* heap, etUInt32 size, etUInt16 blockSize);
#endif /* _ETMEMORY_FIXED_SIZE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.c b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.c
index d474292b6..5281ec46e 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.c
@@ -134,7 +134,7 @@ void etMemory_FreeList_free(etMemory* heap, void* obj, etUInt16 size) {
/*
* the public interface
*/
-etMemory* etMemory_FreeList_init(void* heap, etUInt16 size, etUInt16 nslots) {
+etMemory* etMemory_FreeList_init(void* heap, etUInt32 size, etUInt16 nslots) {
etFreeListMemory* self = (etFreeListMemory*) heap;
ET_MSC_LOGGER_SYNC_ENTRY("etMemory_FreeList_init", "init")
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.h b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.h
index e21d1d750..a9c018b72 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etMemory_FreeList.h
@@ -24,6 +24,6 @@
*
* \return the pointer to the initialized etMemory struct
*/
-etMemory* etMemory_FreeList_init(void* heap, etUInt16 size, etUInt16 nslots);
+etMemory* etMemory_FreeList_init(void* heap, etUInt32 size, etUInt16 nslots);
#endif /* _ETMEMORY_FREE_LIST_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.c b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.c
index b2f92db18..8496cdba0 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.c
@@ -25,7 +25,7 @@ void etQueue_init(etQueue* self){
}
-void etQueue_push(etQueue* self, void* obj){
+void etQueue_push(etQueue* self, etQueueObj* obj){
// TODO: optimize queue for concurrent push / pop
ET_MSC_LOGGER_SYNC_ENTRY("etQueue", "push")
@@ -38,7 +38,7 @@ void etQueue_push(etQueue* self, void* obj){
self->last->next = obj;
self->last = obj;
}
- ((etQueueObj*)obj)->next = NULL; /*TODO: optimization: this line could be removed if we assume that all objects are initialized*/
+ obj->next = NULL; /*TODO: optimization: this line could be removed if we assume that all objects are initialized*/
if (++self->size > self->highWaterMark)
self->highWaterMark++;
@@ -46,7 +46,7 @@ void etQueue_push(etQueue* self, void* obj){
ET_MSC_LOGGER_SYNC_EXIT
}
-void* etQueue_pop(etQueue* self){
+etQueueObj* etQueue_pop(etQueue* self){
etQueueObj* pop_msg = self->first;
ET_MSC_LOGGER_SYNC_ENTRY("etQueue", "pop")
@@ -78,13 +78,13 @@ etInt16 etQueue_getSize(etQueue* self) {
return self->size;
}
-void* etQueue_getFirst(etQueue* self){
+etQueueObj* etQueue_getFirst(etQueue* self){
ET_MSC_LOGGER_SYNC_ENTRY("etQueue", "getFirst")
ET_MSC_LOGGER_SYNC_EXIT
return self->first;
}
-void* etQueue_getLast(etQueue* self){
+etQueueObj* etQueue_getLast(etQueue* self){
ET_MSC_LOGGER_SYNC_ENTRY("etQueue", "getLast")
ET_MSC_LOGGER_SYNC_EXIT
return self->last;
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.h b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.h
index dc60d6ff2..ab656d154 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/base/etQueue.h
@@ -30,13 +30,13 @@ typedef struct etQueue {
void etQueue_init(etQueue* self);
-void etQueue_push(etQueue* self, void* obj);
+void etQueue_push(etQueue* self, etQueueObj* obj);
-void* etQueue_pop(etQueue* self);
+etQueueObj* etQueue_pop(etQueue* self);
-void* etQueue_getFirst(etQueue* self);
+etQueueObj* etQueue_getFirst(etQueue* self);
-void* etQueue_getLast(etQueue* self);
+etQueueObj* etQueue_getLast(etQueue* self);
etBool etQueue_isNotEmpty(etQueue* self);

Back to the top