-/*
- * Ringbuffer Routines for VM\r
- * (c) Lei Xia, 2010
- */\r
+/*
+ * Ringbuffer
+ * (c) Lei Xia 2010
+ */
+
-#ifndef __PALACIOS_RING_BUFFER_H__\r
-#define __PALACIOS_RING_BUFFER_H__\r
-\r
-struct ringbuf {\r
- unsigned char * buf;\r
- unsigned int size;\r
+#ifndef __PALACIOS_RING_BUFFER_H__
+#define __PALACIOS_RING_BUFFER_H__
- unsigned int start;\r
- unsigned int end;\r
- unsigned int current_len;\r
+struct ringbuf {
+ unsigned char * buf;
+ unsigned int size;
+
+ unsigned int start;
+ unsigned int end;
+ unsigned int current_len;
};
-\r
-\r
-struct ringbuf * create_ringbuf(unsigned int size);\r
-void free_ringbuf(struct ringbuf * ring);\r
-int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len);\r
-int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len);\r
-int ringbuf_data_len(struct ringbuf * ring);\r
-#endif\r
-\r
+
+struct ringbuf * create_ringbuf(unsigned int size);
+void free_ringbuf(struct ringbuf * ring);
+int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len);
+int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len);
+int ringbuf_data_len(struct ringbuf * ring);
+
+#endif
+