aboutsummaryrefslogtreecommitdiffstats
path: root/src/gqueue/sys_defs.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-05-09 21:31:16 +1000
committerinmarket <andrewh@inmarket.com.au>2014-05-09 21:31:16 +1000
commitc475d69a9cbf8d2796904140dbf0f2d9d1d1220f (patch)
tree1719873eef612dd70816c9895cb78c06e9e02f20 /src/gqueue/sys_defs.h
parentcf5867b33d76d775782412d74733d221136af556 (diff)
downloaduGFX-c475d69a9cbf8d2796904140dbf0f2d9d1d1220f.tar.gz
uGFX-c475d69a9cbf8d2796904140dbf0f2d9d1d1220f.tar.bz2
uGFX-c475d69a9cbf8d2796904140dbf0f2d9d1d1220f.zip
New gqueue calls to allow inserting an object into the queue at an arbitrary location.
Diffstat (limited to 'src/gqueue/sys_defs.h')
-rw-r--r--src/gqueue/sys_defs.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gqueue/sys_defs.h b/src/gqueue/sys_defs.h
index b97f2f4d..d0e46be1 100644
--- a/src/gqueue/sys_defs.h
+++ b/src/gqueue/sys_defs.h
@@ -199,6 +199,31 @@ bool_t gfxQueueFSyncPush(gfxQueueFSync *pqueue, gfxQueueFSyncItem *pitem, delayt
/* @} */
/**
+ * @brief Insert an item on the queue after the specified item.
+ * @return none for ASync and GSync queues; For FSync queues - FALSE on timeout, otherwise TRUE
+ *
+ * @param[in] pqueue A pointer to the queue
+ * @param[in] pitem A pointer to the queue item
+ * @param[in] pafter A pointer to the queue item this new item must be inserted after. If NULL or
+ * pafter can't be found in the queue, it puts the new item at the end of the queue.
+ * @param[in] ms The maxmimum time to wait for an item to be removed from the queue (only for FSync queues)
+ *
+ * @note FSync: Use a delay time of TIME_IMMEDIATE if you don't want to wait until the
+ * item is removed from the queue. Note that even if the timeout occurs - the item
+ * remains in the queue.
+ * @note The routines ending in "I" are interrupt/system/iclass level routines.
+ *
+ * @api
+ * @{
+ */
+void gfxQueueASyncInsert(gfxQueueASync *pqueue, gfxQueueASyncItem *pitem, gfxQueueASyncItem *pafter);
+void gfxQueueASyncInsertI(gfxQueueASync *pqueue, gfxQueueASyncItem *pitem, gfxQueueASyncItem *pafter);
+void gfxQueueGSyncInsert(gfxQueueGSync *pqueue, gfxQueueGSyncItem *pitem, gfxQueueASyncItem *pafter);
+void gfxQueueGSyncInsertI(gfxQueueGSync *pqueue, gfxQueueGSyncItem *pitem, gfxQueueASyncItem *pafter);
+bool_t gfxQueueFSyncInsert(gfxQueueFSync *pqueue, gfxQueueFSyncItem *pitem, gfxQueueASyncItem *pafter, delaytime_t ms);
+/* @} */
+
+/**
* @brief Remove an item from the queue.
* @note Removes the specified item from the queue where-ever it is in the queue
*