summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-01 08:31:16 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-01 14:10:22 +0200
commit25a978354c8dca740d956e17e3bada1ed0f62612 (patch)
tree3798f2f5d1cd6496c0dddcad3c3d2633cedb602a
parent91e7b0c5ae837c055fd67d77d8db26bfb648261b (diff)
downloadrtems-25a978354c8dca740d956e17e3bada1ed0f62612.tar.bz2
ringbuf: Fix ISR lock initialization/destruction
-rw-r--r--cpukit/libcsupport/include/ringbuf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/ringbuf.h b/cpukit/libcsupport/include/ringbuf.h
index 05bcceb6c1..c16a79d1ae 100644
--- a/cpukit/libcsupport/include/ringbuf.h
+++ b/cpukit/libcsupport/include/ringbuf.h
@@ -26,6 +26,12 @@ typedef struct {
#define Ring_buffer_Initialize( _buffer ) \
do { \
(_buffer)->head = (_buffer)->tail = 0; \
+ rtems_interrupt_lock_initialize(&(_buffer)->lock, "ring buffer"); \
+ } while ( 0 )
+
+#define Ring_buffer_Destory( _buffer ) \
+ do { \
+ rtems_interrupt_lock_destroy(&(_buffer)->lock); \
} while ( 0 )
#define Ring_buffer_Is_empty( _buffer ) \