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>
28 #define NO_INST __attribute__((__no_instrument_function__))
43 void v3_init_ringbuf(struct v3_ringbuf * ring, uint_t size) NO_INST;
44 struct v3_ringbuf * v3_create_ringbuf(uint_t size) NO_INST;
45 void v3_free_ringbuf(struct v3_ringbuf * ring) NO_INST;
48 int v3_ringbuf_read(struct v3_ringbuf * ring, uchar_t * dst, uint_t len) NO_INST;
49 int v3_ringbuf_peek(struct v3_ringbuf * ring, uchar_t * dst, uint_t len) NO_INST;
50 int v3_ringbuf_delete(struct v3_ringbuf * ring, uint_t len) NO_INST;
51 int v3_ringbuf_write(struct v3_ringbuf * ring, uchar_t * src, uint_t len) NO_INST;
52 int v3_ringbuf_data_len(struct v3_ringbuf * ring) NO_INST;
53 int v3_ringbuf_capacity(struct v3_ringbuf * ring) NO_INST;
54 int v3_ringbuf_avail_space(struct v3_ringbuf * ring) NO_INST;
56 void v3_print_ringbuf(struct v3_ringbuf * ring) NO_INST;
61 #endif // ! __VMM_RING_BUFFER_H__