diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qxl.h | 4 | ||||
-rw-r--r-- | src/qxl_ring.c | 20 |
2 files changed, 24 insertions, 0 deletions
@@ -327,6 +327,10 @@ Bool qxl_ring_pop (struct qxl_ring *ring, void *element); void qxl_ring_wait_idle (struct qxl_ring *ring); +void qxl_ring_request_notify (struct qxl_ring *ring); + +int qxl_ring_prod (struct qxl_ring *ring); +int qxl_ring_cons (struct qxl_ring *ring); /* * Surface diff --git a/src/qxl_ring.c b/src/qxl_ring.c index fcbaaa7..2156113 100644 --- a/src/qxl_ring.c +++ b/src/qxl_ring.c @@ -132,3 +132,23 @@ qxl_ring_wait_idle (struct qxl_ring *ring) mem_barrier(); } } + +void +qxl_ring_request_notify (struct qxl_ring *ring) +{ + ring->ring->header.notify_on_prod = ring->ring->header.prod + 1; + ErrorF("%s: requesting notify on prod %d\n", __func__, + ring->ring->header.notify_on_prod); +} + +int +qxl_ring_cons (struct qxl_ring *ring) +{ + return ring->ring->header.cons; +} + +int +qxl_ring_prod (struct qxl_ring *ring) +{ + return ring->ring->header.prod; +} |