[glib] GAsyncQueue: internal cleanup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GAsyncQueue: internal cleanup
- Date: Sun, 2 Oct 2011 00:23:47 +0000 (UTC)
commit 8c5400ff45b28a68cd97965abe16ce45dca2548c
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 1 20:11:38 2011 -0400
GAsyncQueue: internal cleanup
Turn the 'try' parameter of g_async_queue_pop_intern_unlocked
into a 'wait', for better alignment with the GCond api.
glib/gasyncqueue.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c
index ba64998..c373fe9 100644
--- a/glib/gasyncqueue.c
+++ b/glib/gasyncqueue.c
@@ -404,14 +404,14 @@ g_async_queue_push_sorted_unlocked (GAsyncQueue *queue,
static gpointer
g_async_queue_pop_intern_unlocked (GAsyncQueue *queue,
- gboolean try,
+ gboolean wait,
GTimeVal *end_time)
{
gpointer retval;
if (!g_queue_peek_tail_link (&queue->queue))
{
- if (try)
+ if (!wait)
return NULL;
if (!end_time)
@@ -457,7 +457,7 @@ g_async_queue_pop (GAsyncQueue *queue)
g_return_val_if_fail (queue, NULL);
g_mutex_lock (&queue->mutex);
- retval = g_async_queue_pop_intern_unlocked (queue, FALSE, NULL);
+ retval = g_async_queue_pop_intern_unlocked (queue, TRUE, NULL);
g_mutex_unlock (&queue->mutex);
return retval;
@@ -479,7 +479,7 @@ g_async_queue_pop_unlocked (GAsyncQueue *queue)
{
g_return_val_if_fail (queue, NULL);
- return g_async_queue_pop_intern_unlocked (queue, FALSE, NULL);
+ return g_async_queue_pop_intern_unlocked (queue, TRUE, NULL);
}
/**
@@ -500,7 +500,7 @@ g_async_queue_try_pop (GAsyncQueue *queue)
g_return_val_if_fail (queue, NULL);
g_mutex_lock (&queue->mutex);
- retval = g_async_queue_pop_intern_unlocked (queue, TRUE, NULL);
+ retval = g_async_queue_pop_intern_unlocked (queue, FALSE, NULL);
g_mutex_unlock (&queue->mutex);
return retval;
@@ -523,7 +523,7 @@ g_async_queue_try_pop_unlocked (GAsyncQueue *queue)
{
g_return_val_if_fail (queue, NULL);
- return g_async_queue_pop_intern_unlocked (queue, TRUE, NULL);
+ return g_async_queue_pop_intern_unlocked (queue, FALSE, NULL);
}
/**
@@ -551,7 +551,7 @@ g_async_queue_timed_pop (GAsyncQueue *queue,
g_return_val_if_fail (queue, NULL);
g_mutex_lock (&queue->mutex);
- retval = g_async_queue_pop_intern_unlocked (queue, FALSE, end_time);
+ retval = g_async_queue_pop_intern_unlocked (queue, TRUE, end_time);
g_mutex_unlock (&queue->mutex);
return retval;
@@ -581,7 +581,7 @@ g_async_queue_timed_pop_unlocked (GAsyncQueue *queue,
{
g_return_val_if_fail (queue, NULL);
- return g_async_queue_pop_intern_unlocked (queue, FALSE, end_time);
+ return g_async_queue_pop_intern_unlocked (queue, TRUE, end_time);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]