2 #ifndef UTIL_RINGBUFFER_H
3 #define UTIL_RINGBUFFER_H
5 #include "pipe/p_compiler.h"
6 #include "pipe/p_defines.h" /* only for pipe_error! */
15 struct util_ringbuffer
;
17 struct util_ringbuffer
*util_ringbuffer_create( unsigned dwords
);
19 void util_ringbuffer_destroy( struct util_ringbuffer
*ring
);
21 void util_ringbuffer_enqueue( struct util_ringbuffer
*ring
,
22 const struct util_packet
*packet
);
24 enum pipe_error
util_ringbuffer_dequeue( struct util_ringbuffer
*ring
,
25 struct util_packet
*packet
,