[kdbus] sync with kdbus (kdbus.h - commit: 5ae1ecac44cb)
[platform/upstream/glib.git] / glib / gthreadprivate.h
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  * The Gnome Library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2 of the
10  * License, or (at your option) any later version.
11  *
12  * The Gnome 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
18  * License along with the Gnome Library; see the file COPYING.LIB.  If not,
19  * see <http://www.gnu.org/licenses/>.
20  */
21
22 #ifndef __G_THREADPRIVATE_H__
23 #define __G_THREADPRIVATE_H__
24
25 #include "deprecated/gthread.h"
26
27 typedef struct _GRealThread GRealThread;
28 struct  _GRealThread
29 {
30   GThread thread;
31
32   gint ref_count;
33   gboolean ours;
34   gchar *name;
35   gpointer retval;
36 };
37
38 /* system thread implementation (gthread-posix.c, gthread-win32.c) */
39 void            g_system_thread_wait            (GRealThread  *thread);
40
41 GRealThread *   g_system_thread_new             (GThreadFunc   func,
42                                                  gulong        stack_size,
43                                                  GError      **error);
44 void            g_system_thread_free            (GRealThread  *thread);
45
46 void            g_system_thread_exit            (void);
47 void            g_system_thread_set_name        (const gchar  *name);
48
49
50 /* gthread.c */
51 GThread *       g_thread_new_internal           (const gchar  *name,
52                                                  GThreadFunc   proxy,
53                                                  GThreadFunc   func,
54                                                  gpointer      data,
55                                                  gsize         stack_size,
56                                                  GError      **error);
57
58 gpointer        g_thread_proxy                  (gpointer      thread);
59
60 #endif /* __G_THREADPRIVATE_H__ */