aboutsummaryrefslogtreecommitdiffstats
path: root/src/gqueue/gqueue.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-03-11 17:11:02 +1000
committerinmarket <andrewh@inmarket.com.au>2014-03-11 17:11:02 +1000
commit944c33cbff5f2cfb1c80f48193aa2161574864fd (patch)
tree830d30c57bd31b932e6a090a4bb4bdbac30afceb /src/gqueue/gqueue.c
parenta29501c7bda2212417e1df4b255690bd7fb61ad2 (diff)
downloaduGFX-944c33cbff5f2cfb1c80f48193aa2161574864fd.tar.gz
uGFX-944c33cbff5f2cfb1c80f48193aa2161574864fd.tar.bz2
uGFX-944c33cbff5f2cfb1c80f48193aa2161574864fd.zip
Add support for gfxQueueGSyncGetI()
Diffstat (limited to 'src/gqueue/gqueue.c')
-rw-r--r--src/gqueue/gqueue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gqueue/gqueue.c b/src/gqueue/gqueue.c
index f3da1cdf..b7ecb032 100644
--- a/src/gqueue/gqueue.c
+++ b/src/gqueue/gqueue.c
@@ -138,6 +138,17 @@
return pi;
}
+ gfxQueueGSyncItem *gfxQueueGSyncGetI(gfxQueueGSync *pqueue) {
+ gfxQueueGSyncItem *pi;
+
+ if (!gfxSemWaitI(&pqueue->sem))
+ return 0;
+
+ pi = pqueue->head;
+ pqueue->head = pi->next;
+ pi->next = 0;
+ return pi;
+ }
void gfxQueueGSyncPut(gfxQueueGSync *pqueue, gfxQueueGSyncItem *pitem) {
gfxSystemLock();