diff options
author | Henrik Rentz-Reichert | 2012-01-12 14:11:37 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2012-01-12 14:11:37 +0000 |
commit | caa7cd1c95a48b30b65f6b3fa6486b498dac56a3 (patch) | |
tree | 4fcdf883d1823f989ab83d7edd747546b7bc91c4 /runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h | |
parent | 19701c3a39434f3272ffe590f9284f3e0542e43b (diff) | |
parent | 1d5477d83b321341015ae4aaebe834e71445b4bf (diff) | |
download | org.eclipse.etrice-caa7cd1c95a48b30b65f6b3fa6486b498dac56a3.tar.gz org.eclipse.etrice-caa7cd1c95a48b30b65f6b3fa6486b498dac56a3.tar.xz org.eclipse.etrice-caa7cd1c95a48b30b65f6b3fa6486b498dac56a3.zip |
Merge branch 'master' of ssh://hrentzreich@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h')
-rw-r--r-- | runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h b/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h new file mode 100644 index 000000000..b2326eec8 --- /dev/null +++ b/runtime/org.eclipse.etrice.runtime.c/src/RMessageQueue.h @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2011 protos software gmbh (http://www.protos.de). + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * CONTRIBUTORS: + * Thomas Schuetz (initial contribution) + * + *******************************************************************************/ + +#ifndef _RMESSAGEQUEUE_H_ +#define _RMESSAGEQUEUE_H_ + +#include "RMessage.h" +#include <stddef.h> + +typedef struct RMessageQueue { + RMessage* first; + RMessage* last; + int16 highWaterMark; + int16 size; + +} RMessageQueue; + +void RMessageQueue_init(RMessageQueue* self); + +void RMessageQueue_push(RMessageQueue* self, RMessage* msg); + +RMessage* RMessageQueue_pop(RMessageQueue* self); + +int16 RMessageQueue_getSize(RMessageQueue* self); + +RMessage* RMessageQueue_getFirst(RMessageQueue* self); + +RMessage* RMessageQueue_getLast(RMessageQueue* self); + +boool RMessageQueue_isNotEmpty(RMessageQueue* self); + +int16 RMessageQueue_getHightWaterMark(RMessageQueue* self); + + + +#endif /* _RMESSAGEQUEUE_H_ */ |