1 /* GLIB - Library of useful routines for C programming 2 * 3 * gthreadprivate.h - GLib internal thread system related declarations. 4 * 5 * Copyright (C) 2003 Sebastian Wilhelmi 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public License 18 * along with this library; if not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __G_THREADPRIVATE_H__ 22 #define __G_THREADPRIVATE_H__ 23 24 #include "deprecated/gthread.h" 25 26 typedef struct _GRealThread GRealThread; 27 struct _GRealThread 28 { 29 GThread thread; 30 31 gint ref_count; 32 gboolean ours; 33 gchar *name; 34 gpointer retval; 35 }; 36 37 /* system thread implementation (gthread-posix.c, gthread-win32.c) */ 38 void g_system_thread_wait (GRealThread *thread); 39 40 GRealThread * g_system_thread_new (GThreadFunc proxy, 41 gulong stack_size, 42 const char *name, 43 GThreadFunc func, 44 gpointer data, 45 GError **error); 46 void g_system_thread_free (GRealThread *thread); 47 48 void g_system_thread_exit (void); 49 void g_system_thread_set_name (const gchar *name); 50 51 52 /* gthread.c */ 53 GThread * g_thread_new_internal (const gchar *name, 54 GThreadFunc proxy, 55 GThreadFunc func, 56 gpointer data, 57 gsize stack_size, 58 GError **error); 59 60 gpointer g_thread_proxy (gpointer thread); 61 62 gpointer g_private_set_alloc0 (GPrivate *key, 63 gsize size); 64 65 #endif /* __G_THREADPRIVATE_H__ */ 66