Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-06 08:41:16

0001 /* GLIB - Library of useful routines for C programming
0002  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 /*
0021  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
0022  * file for a list of people on the GLib Team.  See the ChangeLog
0023  * files for a list of changes.  These files are distributed with
0024  * GLib at ftp://ftp.gtk.org/pub/gtk/.
0025  */
0026 
0027 #ifndef __G_ASYNCQUEUE_H__
0028 #define __G_ASYNCQUEUE_H__
0029 
0030 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0031 #error "Only <glib.h> can be included directly."
0032 #endif
0033 
0034 #include <glib/gthread.h>
0035 
0036 G_BEGIN_DECLS
0037 
0038 typedef struct _GAsyncQueue GAsyncQueue;
0039 
0040 GLIB_AVAILABLE_IN_ALL
0041 GAsyncQueue *g_async_queue_new                  (void);
0042 GLIB_AVAILABLE_IN_ALL
0043 GAsyncQueue *g_async_queue_new_full             (GDestroyNotify item_free_func);
0044 GLIB_AVAILABLE_IN_ALL
0045 void         g_async_queue_lock                 (GAsyncQueue      *queue);
0046 GLIB_AVAILABLE_IN_ALL
0047 void         g_async_queue_unlock               (GAsyncQueue      *queue);
0048 GLIB_AVAILABLE_IN_ALL
0049 GAsyncQueue *g_async_queue_ref                  (GAsyncQueue      *queue);
0050 GLIB_AVAILABLE_IN_ALL
0051 void         g_async_queue_unref                (GAsyncQueue      *queue);
0052 
0053 GLIB_DEPRECATED_FOR(g_async_queue_ref)
0054 void         g_async_queue_ref_unlocked         (GAsyncQueue      *queue);
0055 
0056 GLIB_DEPRECATED_FOR(g_async_queue_unref)
0057 void         g_async_queue_unref_and_unlock     (GAsyncQueue      *queue);
0058 
0059 GLIB_AVAILABLE_IN_ALL
0060 void         g_async_queue_push                 (GAsyncQueue      *queue,
0061                                                  gpointer          data);
0062 GLIB_AVAILABLE_IN_ALL
0063 void         g_async_queue_push_unlocked        (GAsyncQueue      *queue,
0064                                                  gpointer          data);
0065 GLIB_AVAILABLE_IN_ALL
0066 void         g_async_queue_push_sorted          (GAsyncQueue      *queue,
0067                                                  gpointer          data,
0068                                                  GCompareDataFunc  func,
0069                                                  gpointer          user_data);
0070 GLIB_AVAILABLE_IN_ALL
0071 void         g_async_queue_push_sorted_unlocked (GAsyncQueue      *queue,
0072                                                  gpointer          data,
0073                                                  GCompareDataFunc  func,
0074                                                  gpointer          user_data);
0075 GLIB_AVAILABLE_IN_ALL
0076 gpointer     g_async_queue_pop                  (GAsyncQueue      *queue);
0077 GLIB_AVAILABLE_IN_ALL
0078 gpointer     g_async_queue_pop_unlocked         (GAsyncQueue      *queue);
0079 GLIB_AVAILABLE_IN_ALL
0080 gpointer     g_async_queue_try_pop              (GAsyncQueue      *queue);
0081 GLIB_AVAILABLE_IN_ALL
0082 gpointer     g_async_queue_try_pop_unlocked     (GAsyncQueue      *queue);
0083 GLIB_AVAILABLE_IN_ALL
0084 gpointer     g_async_queue_timeout_pop          (GAsyncQueue      *queue,
0085                                                  guint64           timeout);
0086 GLIB_AVAILABLE_IN_ALL
0087 gpointer     g_async_queue_timeout_pop_unlocked (GAsyncQueue      *queue,
0088                                                  guint64           timeout);
0089 GLIB_AVAILABLE_IN_ALL
0090 gint         g_async_queue_length               (GAsyncQueue      *queue);
0091 GLIB_AVAILABLE_IN_ALL
0092 gint         g_async_queue_length_unlocked      (GAsyncQueue      *queue);
0093 GLIB_AVAILABLE_IN_ALL
0094 void         g_async_queue_sort                 (GAsyncQueue      *queue,
0095                                                  GCompareDataFunc  func,
0096                                                  gpointer          user_data);
0097 GLIB_AVAILABLE_IN_ALL
0098 void         g_async_queue_sort_unlocked        (GAsyncQueue      *queue,
0099                                                  GCompareDataFunc  func,
0100                                                  gpointer          user_data);
0101 
0102 GLIB_AVAILABLE_IN_2_46
0103 gboolean     g_async_queue_remove               (GAsyncQueue      *queue,
0104                                                  gpointer          item);
0105 GLIB_AVAILABLE_IN_2_46
0106 gboolean     g_async_queue_remove_unlocked      (GAsyncQueue      *queue,
0107                                                  gpointer          item);
0108 GLIB_AVAILABLE_IN_2_46
0109 void         g_async_queue_push_front           (GAsyncQueue      *queue,
0110                                                  gpointer          item);
0111 GLIB_AVAILABLE_IN_2_46
0112 void         g_async_queue_push_front_unlocked  (GAsyncQueue      *queue,
0113                                                  gpointer          item);
0114 
0115 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
0116 GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop)
0117 gpointer     g_async_queue_timed_pop            (GAsyncQueue      *queue,
0118                                                  GTimeVal         *end_time);
0119 GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop_unlocked)
0120 gpointer     g_async_queue_timed_pop_unlocked   (GAsyncQueue      *queue,
0121                                                  GTimeVal         *end_time);
0122 G_GNUC_END_IGNORE_DEPRECATIONS
0123 
0124 G_END_DECLS
0125 
0126 #endif /* __G_ASYNCQUEUE_H__ */