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) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
20 #ifndef __VMM_RING_BUFFER_H__
21 #define __VMM_RING_BUFFER_H__
25 #include <palacios/vmm_types.h>
38 void v3_init_ringbuf(struct v3_ringbuf * ring, uint_t size);
39 struct v3_ringbuf * v3_create_ringbuf(uint_t size);
40 void v3_free_ringbuf(struct v3_ringbuf * ring);
43 int v3_ringbuf_read(struct v3_ringbuf * ring, uchar_t * dst, uint_t len);
44 int v3_ringbuf_peek(struct v3_ringbuf * ring, uchar_t * dst, uint_t len);
45 int v3_ringbuf_delete(struct v3_ringbuf * ring, uint_t len);
46 int v3_ringbuf_write(struct v3_ringbuf * ring, uchar_t * src, uint_t len);
47 int v3_ringbuf_data_len(struct v3_ringbuf * ring);
48 int v3_ringbuf_capacity(struct v3_ringbuf * ring);
51 void v3_print_ringbuf(struct v3_ringbuf * ring);
56 #endif // ! __VMM_RING_BUFFER_H__