guint len;
};
-/* Resizable arrays, remove fills any cleared spot and shortens the
+/* Resizable arrays. remove fills any cleared spot and shortens the
* array, while preserving the order. remove_fast will distort the
- * order by moving the last element to the position of the removed
+ * order by moving the last element to the position of the removed.
*/
#define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1)
gpointer user_data);
/* Resizable pointer array. This interface is much less complicated
- * than the above. Add appends appends a pointer. Remove fills any
- * cleared spot and shortens the array. remove_fast will again distort
- * order.
+ * than the above. Add appends a pointer. Remove fills any cleared
+ * spot and shortens the array. remove_fast will again distort order.
*/
#define g_ptr_array_index(array,index_) ((array)->pdata)[index_]
GPtrArray* g_ptr_array_new (void);
/* Get a new GAsyncQueue with the ref_count 1 */
GAsyncQueue* g_async_queue_new (void);
-/* Lock and unlock an GAsyncQueue, all functions lock the queue for
+/* Lock and unlock a GAsyncQueue. All functions lock the queue for
* themselves, but in certain cirumstances you want to hold the lock longer,
- * thus you lock the queue, call the *_unlocked functions and unlock it again
+ * thus you lock the queue, call the *_unlocked functions and unlock it again.
*/
void g_async_queue_lock (GAsyncQueue *queue);
void g_async_queue_unlock (GAsyncQueue *queue);
* lock (g_async_queue_unref) and one to call, when you already hold
* the lock (g_async_queue_unref_and_unlock). After that however, you
* don't hold the lock anymore and the Queue might in fact be
- * destroyed, if you unrefed to zero */
+ * destroyed, if you unrefed to zero. */
void g_async_queue_ref (GAsyncQueue *queue);
void g_async_queue_ref_unlocked (GAsyncQueue *queue);
void g_async_queue_unref (GAsyncQueue *queue);
void g_async_queue_unref_and_unlock (GAsyncQueue *queue);
-/* Push data into the async queue. Must not be NULL */
+/* Push data into the async queue. Must not be NULL. */
void g_async_queue_push (GAsyncQueue *queue,
gpointer data);
void g_async_queue_push_unlocked (GAsyncQueue *queue,
gpointer data);
-/* Pop data from the async queue, when no data is there, the thread is blocked
- * until data arrives */
+/* Pop data from the async queue. When no data is there, the thread is blocked
+ * until data arrives. */
gpointer g_async_queue_pop (GAsyncQueue *queue);
gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue);
-/* Try to pop data, NULL is returned in case of empty queue */
+/* Try to pop data. NULL is returned in case of empty queue. */
gpointer g_async_queue_try_pop (GAsyncQueue *queue);
gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue);
-/* Wait for data until at maximum until end_time is reached, NULL is returned
- * in case of empty queue*/
+/* Wait for data until at maximum until end_time is reached. NULL is returned
+ * in case of empty queue. */
gpointer g_async_queue_timed_pop (GAsyncQueue *queue,
GTimeVal *end_time);
gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue,
GTimeVal *end_time);
-/* Return the length of the queue, negative values mean, that threads
- * are waiting, positve values mean, that there are entries in the
+/* Return the length of the queue. Negative values mean that threads
+ * are waiting, positve values mean that there are entries in the
* queue. Actually this function returns the length of the queue minus
* the number of waiting threads, g_async_queue_length == 0 could also
- * mean 'n' entries in the queue and 'n' thread waiting, such can
+ * mean 'n' entries in the queue and 'n' thread waiting. Such can
* happen due to locking of the queue or due to scheduling. */
gint g_async_queue_length (GAsyncQueue *queue);
gint g_async_queue_length_unlocked (GAsyncQueue *queue);