Add support for gfxQueueGSyncGetI()

This commit is contained in:
inmarket 2014-03-11 17:11:02 +10:00
parent a29501c7bd
commit 944c33cbff
2 changed files with 18 additions and 6 deletions

View File

@ -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();

View File

@ -113,6 +113,7 @@ void gfxQueueFSyncInit(gfxQueueFSync *pqueue);
gfxQueueASyncItem *gfxQueueASyncGet(gfxQueueASync *pqueue);
gfxQueueASyncItem *gfxQueueASyncGetI(gfxQueueASync *pqueue);
gfxQueueGSyncItem *gfxQueueGSyncGet(gfxQueueGSync *pqueue, delaytime_t ms);
gfxQueueGSyncItem *gfxQueueGSyncGetI(gfxQueueGSync *pqueue);
gfxQueueFSyncItem *gfxQueueFSyncGet(gfxQueueFSync *pqueue, delaytime_t ms);
/* @} */
@ -208,12 +209,12 @@ void gfxQueueFSyncRemove(gfxQueueFSync *pqueue, gfxQueueFSyncItem *pitem);
* @api
* @{
*/
#define gfxQueueASyncIsEmpty(pqueue) (pqueue->head == 0)
#define gfxQueueASyncIsEmptyI(pqueue) (pqueue->head == 0)
#define gfxQueueGSyncIsEmpty(pqueue) (pqueue->head == 0)
#define gfxQueueGSyncIsEmptyI(pqueue) (pqueue->head == 0)
#define gfxQueueFSyncIsEmpty(pqueue) (pqueue->head == 0)
#define gfxQueueFSyncIsEmptyI(pqueue) (pqueue->head == 0)
#define gfxQueueASyncIsEmpty(pqueue) ((pqueue)->head == 0)
#define gfxQueueASyncIsEmptyI(pqueue) ((pqueue)->head == 0)
#define gfxQueueGSyncIsEmpty(pqueue) ((pqueue)->head == 0)
#define gfxQueueGSyncIsEmptyI(pqueue) ((pqueue)->head == 0)
#define gfxQueueFSyncIsEmpty(pqueue) ((pqueue)->head == 0)
#define gfxQueueFSyncIsEmptyI(pqueue) ((pqueue)->head == 0)
/* @} */
/**