diff options
author | Alon Levy <alevy@redhat.com> | 2012-06-25 16:13:29 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-06-27 17:36:03 +0300 |
commit | 2e6c21608f0fbead2dd057a05d951386223fc241 (patch) | |
tree | a9f72a4da66bacc2996b5f4f10300fab487a7d38 | |
parent | ec5627d4dd634dd29cb920daa2760bb95ab281da (diff) |
(for later) qxl_ring: add helpers (debugging/unused)
-rw-r--r-- | src/qxl.h | 4 | ||||
-rw-r--r-- | src/qxl_ring.c | 20 |
2 files changed, 24 insertions, 0 deletions
@@ -322,6 +322,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; +} |