2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2010, Lei Xia <lxia@northwestern.edu>
11 * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * This is free software. You are permitted to use, redistribute,
15 * and modify it under the terms of the GNU General Public License
16 * Version 2 (GPLv2). The accompanying COPYING file contains the
17 * full text of the license.
20 #ifndef __PALACIOS_RING_BUFFER_H__
21 #define __PALACIOS_RING_BUFFER_H__
29 unsigned int current_len;
33 struct ringbuf * create_ringbuf(unsigned int size);
34 void free_ringbuf(struct ringbuf * ring);
35 int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len);
36 int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len);
37 int ringbuf_data_len(struct ringbuf * ring);