diff options
author | Alon Levy <alevy@redhat.com> | 2012-06-25 16:13:29 +0300 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-07-15 19:21:34 +0200 |
commit | de547245e75ea88f780205da072967bff119a636 (patch) | |
tree | 5e1eb23549c65569515bef11c53b09c88b502ba7 /src | |
parent | b4e3f07474c919af0e484a71fb86c788a703ad8c (diff) |
(for later) qxl_ring: add helpers (debugging/unused)
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; +} |