blob: 85f0ad6c1f6746104700ae691f57420f7e728d9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef UTIL_RINGBUFFER_H
#define UTIL_RINGBUFFER_H
#include "pipe/p_compiler.h"
#include "pipe/p_defines.h" /* only for pipe_error! */
/* Generic header
*/
struct util_packet {
unsigned dwords:8;
unsigned data24:24;
};
struct util_ringbuffer;
struct util_ringbuffer *util_ringbuffer_create( unsigned dwords );
void util_ringbuffer_destroy( struct util_ringbuffer *ring );
void util_ringbuffer_enqueue( struct util_ringbuffer *ring,
const struct util_packet *packet );
enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring,
struct util_packet *packet,
unsigned max_dwords,
boolean wait );
#endif
|