1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtkc.gthread;
26 
27 version(Tango)
28 	private import tango.stdc.stdio;
29 else
30 	private import std.stdio;
31 
32 private import gtkc.gthreadtypes;
33 private import gtkc.Loader;
34 private import gtkc.paths;
35 
36 mixin( _shared ~ "static this()
37 {
38 	// gthread.Thread
39 
40 	Linker.link(g_thread_new, \"g_thread_new\", LIBRARY.GTHREAD);
41 	Linker.link(g_thread_try_new, \"g_thread_try_new\", LIBRARY.GTHREAD);
42 	Linker.link(g_thread_ref, \"g_thread_ref\", LIBRARY.GTHREAD);
43 	Linker.link(g_thread_unref, \"g_thread_unref\", LIBRARY.GTHREAD);
44 	Linker.link(g_thread_join, \"g_thread_join\", LIBRARY.GTHREAD);
45 	Linker.link(g_thread_yield, \"g_thread_yield\", LIBRARY.GTHREAD);
46 	Linker.link(g_thread_exit, \"g_thread_exit\", LIBRARY.GTHREAD);
47 	Linker.link(g_thread_self, \"g_thread_self\", LIBRARY.GTHREAD);
48 	Linker.link(g_bit_lock, \"g_bit_lock\", LIBRARY.GTHREAD);
49 	Linker.link(g_bit_trylock, \"g_bit_trylock\", LIBRARY.GTHREAD);
50 	Linker.link(g_bit_unlock, \"g_bit_unlock\", LIBRARY.GTHREAD);
51 	Linker.link(g_pointer_bit_lock, \"g_pointer_bit_lock\", LIBRARY.GTHREAD);
52 	Linker.link(g_pointer_bit_trylock, \"g_pointer_bit_trylock\", LIBRARY.GTHREAD);
53 	Linker.link(g_pointer_bit_unlock, \"g_pointer_bit_unlock\", LIBRARY.GTHREAD);
54 	Linker.link(g_get_num_processors, \"g_get_num_processors\", LIBRARY.GTHREAD);
55 
56 	// gthread.Mutex
57 
58 	Linker.link(g_mutex_init, \"g_mutex_init\", LIBRARY.GTHREAD);
59 	Linker.link(g_mutex_clear, \"g_mutex_clear\", LIBRARY.GTHREAD);
60 	Linker.link(g_mutex_lock, \"g_mutex_lock\", LIBRARY.GTHREAD);
61 	Linker.link(g_mutex_trylock, \"g_mutex_trylock\", LIBRARY.GTHREAD);
62 	Linker.link(g_mutex_unlock, \"g_mutex_unlock\", LIBRARY.GTHREAD);
63 
64 	// gthread.RecMutex
65 
66 	Linker.link(g_rec_mutex_init, \"g_rec_mutex_init\", LIBRARY.GTHREAD);
67 	Linker.link(g_rec_mutex_clear, \"g_rec_mutex_clear\", LIBRARY.GTHREAD);
68 	Linker.link(g_rec_mutex_lock, \"g_rec_mutex_lock\", LIBRARY.GTHREAD);
69 	Linker.link(g_rec_mutex_trylock, \"g_rec_mutex_trylock\", LIBRARY.GTHREAD);
70 	Linker.link(g_rec_mutex_unlock, \"g_rec_mutex_unlock\", LIBRARY.GTHREAD);
71 
72 	// gthread.RWLock
73 
74 	Linker.link(g_rw_lock_init, \"g_rw_lock_init\", LIBRARY.GTHREAD);
75 	Linker.link(g_rw_lock_clear, \"g_rw_lock_clear\", LIBRARY.GTHREAD);
76 	Linker.link(g_rw_lock_writer_lock, \"g_rw_lock_writer_lock\", LIBRARY.GTHREAD);
77 	Linker.link(g_rw_lock_writer_trylock, \"g_rw_lock_writer_trylock\", LIBRARY.GTHREAD);
78 	Linker.link(g_rw_lock_writer_unlock, \"g_rw_lock_writer_unlock\", LIBRARY.GTHREAD);
79 	Linker.link(g_rw_lock_reader_lock, \"g_rw_lock_reader_lock\", LIBRARY.GTHREAD);
80 	Linker.link(g_rw_lock_reader_trylock, \"g_rw_lock_reader_trylock\", LIBRARY.GTHREAD);
81 	Linker.link(g_rw_lock_reader_unlock, \"g_rw_lock_reader_unlock\", LIBRARY.GTHREAD);
82 
83 	// gthread.Cond
84 
85 	Linker.link(g_cond_init, \"g_cond_init\", LIBRARY.GTHREAD);
86 	Linker.link(g_cond_clear, \"g_cond_clear\", LIBRARY.GTHREAD);
87 	Linker.link(g_cond_wait, \"g_cond_wait\", LIBRARY.GTHREAD);
88 	Linker.link(g_cond_timed_wait, \"g_cond_timed_wait\", LIBRARY.GTHREAD);
89 	Linker.link(g_cond_wait_until, \"g_cond_wait_until\", LIBRARY.GTHREAD);
90 	Linker.link(g_cond_signal, \"g_cond_signal\", LIBRARY.GTHREAD);
91 	Linker.link(g_cond_broadcast, \"g_cond_broadcast\", LIBRARY.GTHREAD);
92 
93 	// gthread.Private
94 
95 	Linker.link(g_private_get, \"g_private_get\", LIBRARY.GTHREAD);
96 	Linker.link(g_private_set, \"g_private_set\", LIBRARY.GTHREAD);
97 	Linker.link(g_private_replace, \"g_private_replace\", LIBRARY.GTHREAD);
98 
99 	// gthread.Once
100 
101 	Linker.link(g_once_init_enter, \"g_once_init_enter\", LIBRARY.GTHREAD);
102 	Linker.link(g_once_init_leave, \"g_once_init_leave\", LIBRARY.GTHREAD);
103 }");
104 
105 mixin( gshared ~"extern(C)
106 {
107 	// gthread.Thread
108 
109 	GThread* function(gchar* name, GThreadFunc func, void* data) c_g_thread_new;
110 	GThread* function(gchar* name, GThreadFunc func, void* data, GError** error) c_g_thread_try_new;
111 	GThread* function(GThread* thread) c_g_thread_ref;
112 	void function(GThread* thread) c_g_thread_unref;
113 	gpointer function(GThread* thread) c_g_thread_join;
114 	void function() c_g_thread_yield;
115 	void function(void* retval) c_g_thread_exit;
116 	GThread* function() c_g_thread_self;
117 	void function(gint* address, gint lockBit) c_g_bit_lock;
118 	gboolean function(gint* address, gint lockBit) c_g_bit_trylock;
119 	void function(gint* address, gint lockBit) c_g_bit_unlock;
120 	void function(void* address, gint lockBit) c_g_pointer_bit_lock;
121 	gboolean function(void* address, gint lockBit) c_g_pointer_bit_trylock;
122 	void function(void* address, gint lockBit) c_g_pointer_bit_unlock;
123 	guint function() c_g_get_num_processors;
124 
125 	// gthread.Mutex
126 
127 	void function(GMutex* mutex) c_g_mutex_init;
128 	void function(GMutex* mutex) c_g_mutex_clear;
129 	void function(GMutex* mutex) c_g_mutex_lock;
130 	gboolean function(GMutex* mutex) c_g_mutex_trylock;
131 	void function(GMutex* mutex) c_g_mutex_unlock;
132 
133 	// gthread.RecMutex
134 
135 	void function(GRecMutex* recMutex) c_g_rec_mutex_init;
136 	void function(GRecMutex* recMutex) c_g_rec_mutex_clear;
137 	void function(GRecMutex* recMutex) c_g_rec_mutex_lock;
138 	gboolean function(GRecMutex* recMutex) c_g_rec_mutex_trylock;
139 	void function(GRecMutex* recMutex) c_g_rec_mutex_unlock;
140 
141 	// gthread.RWLock
142 
143 	void function(GRWLock* rwLock) c_g_rw_lock_init;
144 	void function(GRWLock* rwLock) c_g_rw_lock_clear;
145 	void function(GRWLock* rwLock) c_g_rw_lock_writer_lock;
146 	gboolean function(GRWLock* rwLock) c_g_rw_lock_writer_trylock;
147 	void function(GRWLock* rwLock) c_g_rw_lock_writer_unlock;
148 	void function(GRWLock* rwLock) c_g_rw_lock_reader_lock;
149 	gboolean function(GRWLock* rwLock) c_g_rw_lock_reader_trylock;
150 	void function(GRWLock* rwLock) c_g_rw_lock_reader_unlock;
151 
152 	// gthread.Cond
153 
154 	void function(GCond* cond) c_g_cond_init;
155 	void function(GCond* cond) c_g_cond_clear;
156 	void function(GCond* cond, GMutex* mutex) c_g_cond_wait;
157 	gboolean function(GCond* cond, GMutex* mutex, GTimeVal* absTime) c_g_cond_timed_wait;
158 	gboolean function(GCond* cond, GMutex* mutex, gint64 endTime) c_g_cond_wait_until;
159 	void function(GCond* cond) c_g_cond_signal;
160 	void function(GCond* cond) c_g_cond_broadcast;
161 
162 	// gthread.Private
163 
164 	gpointer function(GPrivate* key) c_g_private_get;
165 	void function(GPrivate* key, void* value) c_g_private_set;
166 	void function(GPrivate* key, void* value) c_g_private_replace;
167 
168 	// gthread.Once
169 
170 	gboolean function(void* location) c_g_once_init_enter;
171 	void function(void* location, gsize result) c_g_once_init_leave;
172 }");
173 
174 // gthread.Thread
175 
176 alias c_g_thread_new  g_thread_new;
177 alias c_g_thread_try_new  g_thread_try_new;
178 alias c_g_thread_ref  g_thread_ref;
179 alias c_g_thread_unref  g_thread_unref;
180 alias c_g_thread_join  g_thread_join;
181 alias c_g_thread_yield  g_thread_yield;
182 alias c_g_thread_exit  g_thread_exit;
183 alias c_g_thread_self  g_thread_self;
184 alias c_g_bit_lock  g_bit_lock;
185 alias c_g_bit_trylock  g_bit_trylock;
186 alias c_g_bit_unlock  g_bit_unlock;
187 alias c_g_pointer_bit_lock  g_pointer_bit_lock;
188 alias c_g_pointer_bit_trylock  g_pointer_bit_trylock;
189 alias c_g_pointer_bit_unlock  g_pointer_bit_unlock;
190 alias c_g_get_num_processors  g_get_num_processors;
191 
192 // gthread.Mutex
193 
194 alias c_g_mutex_init  g_mutex_init;
195 alias c_g_mutex_clear  g_mutex_clear;
196 alias c_g_mutex_lock  g_mutex_lock;
197 alias c_g_mutex_trylock  g_mutex_trylock;
198 alias c_g_mutex_unlock  g_mutex_unlock;
199 
200 // gthread.RecMutex
201 
202 alias c_g_rec_mutex_init  g_rec_mutex_init;
203 alias c_g_rec_mutex_clear  g_rec_mutex_clear;
204 alias c_g_rec_mutex_lock  g_rec_mutex_lock;
205 alias c_g_rec_mutex_trylock  g_rec_mutex_trylock;
206 alias c_g_rec_mutex_unlock  g_rec_mutex_unlock;
207 
208 // gthread.RWLock
209 
210 alias c_g_rw_lock_init  g_rw_lock_init;
211 alias c_g_rw_lock_clear  g_rw_lock_clear;
212 alias c_g_rw_lock_writer_lock  g_rw_lock_writer_lock;
213 alias c_g_rw_lock_writer_trylock  g_rw_lock_writer_trylock;
214 alias c_g_rw_lock_writer_unlock  g_rw_lock_writer_unlock;
215 alias c_g_rw_lock_reader_lock  g_rw_lock_reader_lock;
216 alias c_g_rw_lock_reader_trylock  g_rw_lock_reader_trylock;
217 alias c_g_rw_lock_reader_unlock  g_rw_lock_reader_unlock;
218 
219 // gthread.Cond
220 
221 alias c_g_cond_init  g_cond_init;
222 alias c_g_cond_clear  g_cond_clear;
223 alias c_g_cond_wait  g_cond_wait;
224 alias c_g_cond_timed_wait  g_cond_timed_wait;
225 alias c_g_cond_wait_until  g_cond_wait_until;
226 alias c_g_cond_signal  g_cond_signal;
227 alias c_g_cond_broadcast  g_cond_broadcast;
228 
229 // gthread.Private
230 
231 alias c_g_private_get  g_private_get;
232 alias c_g_private_set  g_private_set;
233 alias c_g_private_replace  g_private_replace;
234 
235 // gthread.Once
236 
237 alias c_g_once_init_enter  g_once_init_enter;
238 alias c_g_once_init_leave  g_once_init_leave;