thread: Delete g_system_thread_self()
[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  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  *   Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef __G_THREADPRIVATE_H__
24 #define __G_THREADPRIVATE_H__
25
26 #include "deprecated/gthread.h"
27 #include "garray.h"
28 #include "gslist.h"
29
30 G_BEGIN_DECLS
31
32 typedef struct _GRealThread GRealThread;
33 typedef void (*GThreadSetup) (GRealThread *thread);
34
35 G_GNUC_INTERNAL void     g_system_thread_join  (gpointer thread);
36 G_GNUC_INTERNAL void     g_system_thread_create (GThreadFunc       func,
37                                                  gpointer          data,
38                                                  gulong            stack_size,
39                                                  gboolean          joinable,
40                                                  gpointer          thread,
41                                                  GError          **error);
42
43 G_GNUC_INTERNAL void     g_system_thread_exit  (void);
44 G_GNUC_INTERNAL void     g_system_thread_set_name (const gchar *name);
45
46 G_GNUC_INTERNAL GThread *g_thread_new_internal (const gchar   *name,
47                                                 GThreadFunc    func,
48                                                 gpointer       data,
49                                                 gboolean       joinable,
50                                                 gsize          stack_size,
51                                                 GThreadSetup   setup_func,
52                                                 GError       **error);
53
54 struct  _GRealThread
55 {
56   GThread thread;
57   const gchar *name;
58   GThreadSetup setup_func;
59   gpointer retval;
60   GSystemThread system_thread;
61 };
62
63 G_GNUC_INTERNAL extern GMutex g_once_mutex;
64
65 #ifdef G_OS_WIN32
66 G_GNUC_INTERNAL void g_thread_DllMain (void);
67 #endif
68
69 G_END_DECLS
70
71 #endif /* __G_THREADPRIVATE_H__ */