sl@0
|
1 |
/* Portion Copyright © 2008-09 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/
|
sl@0
|
2 |
#undef G_DISABLE_ASSERT
|
sl@0
|
3 |
#undef G_LOG_DOMAIN
|
sl@0
|
4 |
|
sl@0
|
5 |
#include <errno.h>
|
sl@0
|
6 |
#include <glib.h>
|
sl@0
|
7 |
#if (defined G_OS_UNIX)||(defined __SYMBIAN32__)
|
sl@0
|
8 |
#include <unistd.h>
|
sl@0
|
9 |
#endif
|
sl@0
|
10 |
#include <stdio.h>
|
sl@0
|
11 |
#include <stdlib.h>
|
sl@0
|
12 |
|
sl@0
|
13 |
#ifdef G_OS_WIN32
|
sl@0
|
14 |
#include <fcntl.h> /* For _O_BINARY used by pipe() macro */
|
sl@0
|
15 |
#include <io.h> /* for _pipe() */
|
sl@0
|
16 |
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
|
sl@0
|
17 |
#endif
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
#ifdef __SYMBIAN32__
|
sl@0
|
22 |
#include <glib_global.h>
|
sl@0
|
23 |
#include "mrt2_glib2_test.h"
|
sl@0
|
24 |
#endif /*__SYMBIAN32__*/
|
sl@0
|
25 |
|
sl@0
|
26 |
#ifndef __SYMBIAN32__
|
sl@0
|
27 |
#define ITERS 10000
|
sl@0
|
28 |
#else
|
sl@0
|
29 |
#define ITERS 100
|
sl@0
|
30 |
#endif
|
sl@0
|
31 |
#define INCREMENT 10
|
sl@0
|
32 |
#define NTHREADS 4
|
sl@0
|
33 |
#define NCRAWLERS 4
|
sl@0
|
34 |
#define CRAWLER_TIMEOUT_RANGE 40
|
sl@0
|
35 |
#define RECURSER_TIMEOUT 50
|
sl@0
|
36 |
|
sl@0
|
37 |
/* The partial ordering between the context array mutex and
|
sl@0
|
38 |
* crawler array mutex is that the crawler array mutex cannot
|
sl@0
|
39 |
* be locked while the context array mutex is locked
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
GPtrArray *context_array;
|
sl@0
|
42 |
GMutex *context_array_mutex;
|
sl@0
|
43 |
GCond *context_array_cond;
|
sl@0
|
44 |
|
sl@0
|
45 |
GMainLoop *main_loop;
|
sl@0
|
46 |
|
sl@0
|
47 |
G_LOCK_DEFINE_STATIC (crawler_array_lock);
|
sl@0
|
48 |
GPtrArray *crawler_array;
|
sl@0
|
49 |
|
sl@0
|
50 |
typedef struct _AddrData AddrData;
|
sl@0
|
51 |
typedef struct _TestData TestData;
|
sl@0
|
52 |
|
sl@0
|
53 |
struct _AddrData
|
sl@0
|
54 |
{
|
sl@0
|
55 |
GMainLoop *loop;
|
sl@0
|
56 |
GIOChannel *dest;
|
sl@0
|
57 |
gint count;
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
struct _TestData
|
sl@0
|
61 |
{
|
sl@0
|
62 |
gint current_val;
|
sl@0
|
63 |
gint iters;
|
sl@0
|
64 |
GIOChannel *in;
|
sl@0
|
65 |
};
|
sl@0
|
66 |
|
sl@0
|
67 |
static void cleanup_crawlers (GMainContext *context);
|
sl@0
|
68 |
|
sl@0
|
69 |
gboolean
|
sl@0
|
70 |
read_all (GIOChannel *channel, char *buf, gsize len)
|
sl@0
|
71 |
{
|
sl@0
|
72 |
gsize bytes_read = 0;
|
sl@0
|
73 |
gsize count;
|
sl@0
|
74 |
GIOError err;
|
sl@0
|
75 |
|
sl@0
|
76 |
while (bytes_read < len)
|
sl@0
|
77 |
{
|
sl@0
|
78 |
err = g_io_channel_read (channel, buf + bytes_read, len - bytes_read, &count);
|
sl@0
|
79 |
if (err)
|
sl@0
|
80 |
{
|
sl@0
|
81 |
if (err != G_IO_ERROR_AGAIN)
|
sl@0
|
82 |
return FALSE;
|
sl@0
|
83 |
}
|
sl@0
|
84 |
else if (count == 0)
|
sl@0
|
85 |
return FALSE;
|
sl@0
|
86 |
|
sl@0
|
87 |
bytes_read += count;
|
sl@0
|
88 |
}
|
sl@0
|
89 |
|
sl@0
|
90 |
return TRUE;
|
sl@0
|
91 |
}
|
sl@0
|
92 |
|
sl@0
|
93 |
gboolean
|
sl@0
|
94 |
write_all (GIOChannel *channel, char *buf, gsize len)
|
sl@0
|
95 |
{
|
sl@0
|
96 |
gsize bytes_written = 0;
|
sl@0
|
97 |
gsize count;
|
sl@0
|
98 |
GIOError err;
|
sl@0
|
99 |
|
sl@0
|
100 |
while (bytes_written < len)
|
sl@0
|
101 |
{
|
sl@0
|
102 |
err = g_io_channel_write (channel, buf + bytes_written, len - bytes_written, &count);
|
sl@0
|
103 |
if (err && err != G_IO_ERROR_AGAIN)
|
sl@0
|
104 |
return FALSE;
|
sl@0
|
105 |
|
sl@0
|
106 |
bytes_written += count;
|
sl@0
|
107 |
}
|
sl@0
|
108 |
|
sl@0
|
109 |
return TRUE;
|
sl@0
|
110 |
}
|
sl@0
|
111 |
|
sl@0
|
112 |
gboolean
|
sl@0
|
113 |
adder_callback (GIOChannel *source,
|
sl@0
|
114 |
GIOCondition condition,
|
sl@0
|
115 |
gpointer data)
|
sl@0
|
116 |
{
|
sl@0
|
117 |
char buf1[32];
|
sl@0
|
118 |
char buf2[32];
|
sl@0
|
119 |
|
sl@0
|
120 |
char result[32];
|
sl@0
|
121 |
|
sl@0
|
122 |
AddrData *addr_data = data;
|
sl@0
|
123 |
|
sl@0
|
124 |
if (!read_all (source, buf1, 32) ||
|
sl@0
|
125 |
!read_all (source, buf2, 32))
|
sl@0
|
126 |
{
|
sl@0
|
127 |
g_main_loop_quit (addr_data->loop);
|
sl@0
|
128 |
return FALSE;
|
sl@0
|
129 |
}
|
sl@0
|
130 |
|
sl@0
|
131 |
sprintf (result, "%d", atoi(buf1) + atoi(buf2));
|
sl@0
|
132 |
write_all (addr_data->dest, result, 32);
|
sl@0
|
133 |
|
sl@0
|
134 |
return TRUE;
|
sl@0
|
135 |
}
|
sl@0
|
136 |
|
sl@0
|
137 |
gboolean
|
sl@0
|
138 |
timeout_callback (gpointer data)
|
sl@0
|
139 |
{
|
sl@0
|
140 |
AddrData *addr_data = data;
|
sl@0
|
141 |
|
sl@0
|
142 |
addr_data->count++;
|
sl@0
|
143 |
|
sl@0
|
144 |
return TRUE;
|
sl@0
|
145 |
}
|
sl@0
|
146 |
|
sl@0
|
147 |
gpointer
|
sl@0
|
148 |
adder_thread (gpointer data)
|
sl@0
|
149 |
{
|
sl@0
|
150 |
GMainContext *context;
|
sl@0
|
151 |
GSource *adder_source;
|
sl@0
|
152 |
GSource *timeout_source;
|
sl@0
|
153 |
|
sl@0
|
154 |
GIOChannel **channels = data;
|
sl@0
|
155 |
AddrData addr_data;
|
sl@0
|
156 |
|
sl@0
|
157 |
context = g_main_context_new ();
|
sl@0
|
158 |
|
sl@0
|
159 |
g_mutex_lock (context_array_mutex);
|
sl@0
|
160 |
|
sl@0
|
161 |
g_ptr_array_add (context_array, context);
|
sl@0
|
162 |
|
sl@0
|
163 |
if (context_array->len == NTHREADS)
|
sl@0
|
164 |
g_cond_broadcast (context_array_cond);
|
sl@0
|
165 |
|
sl@0
|
166 |
g_mutex_unlock (context_array_mutex);
|
sl@0
|
167 |
|
sl@0
|
168 |
addr_data.dest = channels[1];
|
sl@0
|
169 |
addr_data.loop = g_main_loop_new (context, FALSE);
|
sl@0
|
170 |
addr_data.count = 0;
|
sl@0
|
171 |
|
sl@0
|
172 |
adder_source = g_io_create_watch (channels[0], G_IO_IN | G_IO_HUP | G_IO_PRI);
|
sl@0
|
173 |
g_source_set_callback (adder_source, (GSourceFunc)adder_callback, &addr_data, NULL);
|
sl@0
|
174 |
g_source_attach (adder_source, context);
|
sl@0
|
175 |
g_source_unref (adder_source);
|
sl@0
|
176 |
|
sl@0
|
177 |
timeout_source = g_timeout_source_new (10);
|
sl@0
|
178 |
g_source_set_callback (timeout_source, (GSourceFunc)timeout_callback, &addr_data, NULL);
|
sl@0
|
179 |
g_source_set_priority (timeout_source, G_PRIORITY_HIGH);
|
sl@0
|
180 |
g_source_attach (timeout_source, context);
|
sl@0
|
181 |
g_source_unref (timeout_source);
|
sl@0
|
182 |
|
sl@0
|
183 |
g_main_loop_run (addr_data.loop);
|
sl@0
|
184 |
|
sl@0
|
185 |
g_io_channel_unref (channels[0]);
|
sl@0
|
186 |
g_io_channel_unref (channels[1]);
|
sl@0
|
187 |
|
sl@0
|
188 |
g_free (channels);
|
sl@0
|
189 |
|
sl@0
|
190 |
g_main_loop_unref (addr_data.loop);
|
sl@0
|
191 |
|
sl@0
|
192 |
#ifdef VERBOSE
|
sl@0
|
193 |
g_print ("Timeout run %d times\n", addr_data.count);
|
sl@0
|
194 |
#endif
|
sl@0
|
195 |
|
sl@0
|
196 |
g_mutex_lock (context_array_mutex);
|
sl@0
|
197 |
g_ptr_array_remove (context_array, context);
|
sl@0
|
198 |
if (context_array->len == 0)
|
sl@0
|
199 |
g_main_loop_quit (main_loop);
|
sl@0
|
200 |
g_mutex_unlock (context_array_mutex);
|
sl@0
|
201 |
|
sl@0
|
202 |
cleanup_crawlers (context);
|
sl@0
|
203 |
|
sl@0
|
204 |
return NULL;
|
sl@0
|
205 |
}
|
sl@0
|
206 |
|
sl@0
|
207 |
void
|
sl@0
|
208 |
io_pipe (GIOChannel **channels)
|
sl@0
|
209 |
{
|
sl@0
|
210 |
gint fds[2];
|
sl@0
|
211 |
|
sl@0
|
212 |
if (pipe(fds) < 0)
|
sl@0
|
213 |
{
|
sl@0
|
214 |
g_warning ("Cannot create pipe %s\n", g_strerror (errno));
|
sl@0
|
215 |
exit (1);
|
sl@0
|
216 |
}
|
sl@0
|
217 |
|
sl@0
|
218 |
channels[0] = g_io_channel_unix_new (fds[0]);
|
sl@0
|
219 |
channels[1] = g_io_channel_unix_new (fds[1]);
|
sl@0
|
220 |
|
sl@0
|
221 |
g_io_channel_set_close_on_unref (channels[0], TRUE);
|
sl@0
|
222 |
g_io_channel_set_close_on_unref (channels[1], TRUE);
|
sl@0
|
223 |
}
|
sl@0
|
224 |
|
sl@0
|
225 |
void
|
sl@0
|
226 |
do_add (GIOChannel *in, gint a, gint b)
|
sl@0
|
227 |
{
|
sl@0
|
228 |
char buf1[32];
|
sl@0
|
229 |
char buf2[32];
|
sl@0
|
230 |
|
sl@0
|
231 |
sprintf (buf1, "%d", a);
|
sl@0
|
232 |
sprintf (buf2, "%d", b);
|
sl@0
|
233 |
|
sl@0
|
234 |
write_all (in, buf1, 32);
|
sl@0
|
235 |
write_all (in, buf2, 32);
|
sl@0
|
236 |
}
|
sl@0
|
237 |
|
sl@0
|
238 |
gboolean
|
sl@0
|
239 |
adder_response (GIOChannel *source,
|
sl@0
|
240 |
GIOCondition condition,
|
sl@0
|
241 |
gpointer data)
|
sl@0
|
242 |
{
|
sl@0
|
243 |
char result[32];
|
sl@0
|
244 |
TestData *test_data = data;
|
sl@0
|
245 |
|
sl@0
|
246 |
if (!read_all (source, result, 32))
|
sl@0
|
247 |
return FALSE;
|
sl@0
|
248 |
|
sl@0
|
249 |
test_data->current_val = atoi (result);
|
sl@0
|
250 |
test_data->iters--;
|
sl@0
|
251 |
|
sl@0
|
252 |
if (test_data->iters == 0)
|
sl@0
|
253 |
{
|
sl@0
|
254 |
if (test_data->current_val != ITERS * INCREMENT)
|
sl@0
|
255 |
{
|
sl@0
|
256 |
g_print ("Addition failed: %d != %d\n",
|
sl@0
|
257 |
test_data->current_val, ITERS * INCREMENT);
|
sl@0
|
258 |
exit (1);
|
sl@0
|
259 |
}
|
sl@0
|
260 |
|
sl@0
|
261 |
g_io_channel_unref (source);
|
sl@0
|
262 |
g_io_channel_unref (test_data->in);
|
sl@0
|
263 |
|
sl@0
|
264 |
g_free (test_data);
|
sl@0
|
265 |
|
sl@0
|
266 |
return FALSE;
|
sl@0
|
267 |
}
|
sl@0
|
268 |
|
sl@0
|
269 |
do_add (test_data->in, test_data->current_val, INCREMENT);
|
sl@0
|
270 |
|
sl@0
|
271 |
return TRUE;
|
sl@0
|
272 |
}
|
sl@0
|
273 |
|
sl@0
|
274 |
void
|
sl@0
|
275 |
create_adder_thread (void)
|
sl@0
|
276 |
{
|
sl@0
|
277 |
GError *err = NULL;
|
sl@0
|
278 |
TestData *test_data;
|
sl@0
|
279 |
|
sl@0
|
280 |
GIOChannel *in_channels[2];
|
sl@0
|
281 |
GIOChannel *out_channels[2];
|
sl@0
|
282 |
|
sl@0
|
283 |
GIOChannel **sub_channels;
|
sl@0
|
284 |
|
sl@0
|
285 |
sub_channels = g_new (GIOChannel *, 2);
|
sl@0
|
286 |
|
sl@0
|
287 |
io_pipe (in_channels);
|
sl@0
|
288 |
io_pipe (out_channels);
|
sl@0
|
289 |
|
sl@0
|
290 |
sub_channels[0] = in_channels[0];
|
sl@0
|
291 |
sub_channels[1] = out_channels[1];
|
sl@0
|
292 |
|
sl@0
|
293 |
g_thread_create (adder_thread, sub_channels, FALSE, &err);
|
sl@0
|
294 |
|
sl@0
|
295 |
if (err)
|
sl@0
|
296 |
{
|
sl@0
|
297 |
g_warning ("Cannot create thread: %s", err->message);
|
sl@0
|
298 |
exit (1);
|
sl@0
|
299 |
}
|
sl@0
|
300 |
|
sl@0
|
301 |
test_data = g_new (TestData, 1);
|
sl@0
|
302 |
test_data->in = in_channels[1];
|
sl@0
|
303 |
test_data->current_val = 0;
|
sl@0
|
304 |
test_data->iters = ITERS;
|
sl@0
|
305 |
|
sl@0
|
306 |
g_io_add_watch (out_channels[0], G_IO_IN | G_IO_HUP | G_IO_PRI,
|
sl@0
|
307 |
adder_response, test_data);
|
sl@0
|
308 |
|
sl@0
|
309 |
do_add (test_data->in, test_data->current_val, INCREMENT);
|
sl@0
|
310 |
}
|
sl@0
|
311 |
|
sl@0
|
312 |
static void create_crawler (void);
|
sl@0
|
313 |
|
sl@0
|
314 |
static void
|
sl@0
|
315 |
remove_crawler (void)
|
sl@0
|
316 |
{
|
sl@0
|
317 |
GSource *other_source;
|
sl@0
|
318 |
|
sl@0
|
319 |
if (crawler_array->len > 0)
|
sl@0
|
320 |
{
|
sl@0
|
321 |
other_source = crawler_array->pdata[g_random_int_range (0, crawler_array->len)];
|
sl@0
|
322 |
g_source_destroy (other_source);
|
sl@0
|
323 |
g_assert (g_ptr_array_remove_fast (crawler_array, other_source));
|
sl@0
|
324 |
}
|
sl@0
|
325 |
}
|
sl@0
|
326 |
|
sl@0
|
327 |
static gint
|
sl@0
|
328 |
crawler_callback (gpointer data)
|
sl@0
|
329 |
{
|
sl@0
|
330 |
GSource *source = data;
|
sl@0
|
331 |
|
sl@0
|
332 |
G_LOCK (crawler_array_lock);
|
sl@0
|
333 |
|
sl@0
|
334 |
if (!g_ptr_array_remove_fast (crawler_array, source))
|
sl@0
|
335 |
remove_crawler();
|
sl@0
|
336 |
|
sl@0
|
337 |
remove_crawler();
|
sl@0
|
338 |
G_UNLOCK (crawler_array_lock);
|
sl@0
|
339 |
|
sl@0
|
340 |
create_crawler();
|
sl@0
|
341 |
create_crawler();
|
sl@0
|
342 |
|
sl@0
|
343 |
return FALSE;
|
sl@0
|
344 |
}
|
sl@0
|
345 |
|
sl@0
|
346 |
static void
|
sl@0
|
347 |
create_crawler (void)
|
sl@0
|
348 |
{
|
sl@0
|
349 |
GSource *source = g_timeout_source_new (g_random_int_range (0, CRAWLER_TIMEOUT_RANGE));
|
sl@0
|
350 |
g_source_set_callback (source, (GSourceFunc)crawler_callback, source, NULL);
|
sl@0
|
351 |
|
sl@0
|
352 |
G_LOCK (crawler_array_lock);
|
sl@0
|
353 |
g_ptr_array_add (crawler_array, source);
|
sl@0
|
354 |
|
sl@0
|
355 |
g_mutex_lock (context_array_mutex);
|
sl@0
|
356 |
g_source_attach (source, context_array->pdata[g_random_int_range (0, context_array->len)]);
|
sl@0
|
357 |
g_source_unref (source);
|
sl@0
|
358 |
g_mutex_unlock (context_array_mutex);
|
sl@0
|
359 |
|
sl@0
|
360 |
G_UNLOCK (crawler_array_lock);
|
sl@0
|
361 |
}
|
sl@0
|
362 |
|
sl@0
|
363 |
static void
|
sl@0
|
364 |
cleanup_crawlers (GMainContext *context)
|
sl@0
|
365 |
{
|
sl@0
|
366 |
gint i;
|
sl@0
|
367 |
|
sl@0
|
368 |
G_LOCK (crawler_array_lock);
|
sl@0
|
369 |
for (i=0; i < crawler_array->len; i++)
|
sl@0
|
370 |
{
|
sl@0
|
371 |
if (g_source_get_context (crawler_array->pdata[i]) == context)
|
sl@0
|
372 |
{
|
sl@0
|
373 |
g_source_destroy (g_ptr_array_remove_index (crawler_array, i));
|
sl@0
|
374 |
i--;
|
sl@0
|
375 |
}
|
sl@0
|
376 |
}
|
sl@0
|
377 |
G_UNLOCK (crawler_array_lock);
|
sl@0
|
378 |
}
|
sl@0
|
379 |
|
sl@0
|
380 |
static gboolean
|
sl@0
|
381 |
recurser_idle (gpointer data)
|
sl@0
|
382 |
{
|
sl@0
|
383 |
GMainContext *context = data;
|
sl@0
|
384 |
gint i;
|
sl@0
|
385 |
|
sl@0
|
386 |
for (i = 0; i < 10; i++)
|
sl@0
|
387 |
g_main_context_iteration (context, FALSE);
|
sl@0
|
388 |
|
sl@0
|
389 |
return FALSE;
|
sl@0
|
390 |
}
|
sl@0
|
391 |
|
sl@0
|
392 |
static gboolean
|
sl@0
|
393 |
recurser_start (gpointer data)
|
sl@0
|
394 |
{
|
sl@0
|
395 |
GMainContext *context;
|
sl@0
|
396 |
GSource *source;
|
sl@0
|
397 |
|
sl@0
|
398 |
g_mutex_lock (context_array_mutex);
|
sl@0
|
399 |
context = context_array->pdata[g_random_int_range (0, context_array->len)];
|
sl@0
|
400 |
source = g_idle_source_new ();
|
sl@0
|
401 |
g_source_set_callback (source, recurser_idle, context, NULL);
|
sl@0
|
402 |
g_source_attach (source, context);
|
sl@0
|
403 |
g_source_unref (source);
|
sl@0
|
404 |
g_mutex_unlock (context_array_mutex);
|
sl@0
|
405 |
|
sl@0
|
406 |
return TRUE;
|
sl@0
|
407 |
}
|
sl@0
|
408 |
|
sl@0
|
409 |
int
|
sl@0
|
410 |
main (int argc,
|
sl@0
|
411 |
char *argv[])
|
sl@0
|
412 |
{
|
sl@0
|
413 |
/* Only run the test, if threads are enabled and a default thread
|
sl@0
|
414 |
implementation is available */
|
sl@0
|
415 |
#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE)
|
sl@0
|
416 |
gint i;
|
sl@0
|
417 |
|
sl@0
|
418 |
#ifdef __SYMBIAN32__
|
sl@0
|
419 |
g_log_set_handler (NULL, G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG, &mrtLogHandler, NULL);
|
sl@0
|
420 |
g_set_print_handler(mrtPrintHandler);
|
sl@0
|
421 |
#endif /*__SYMBIAN32__*/
|
sl@0
|
422 |
g_thread_init (NULL);
|
sl@0
|
423 |
|
sl@0
|
424 |
context_array = g_ptr_array_new ();
|
sl@0
|
425 |
context_array_mutex = g_mutex_new ();
|
sl@0
|
426 |
context_array_cond = g_cond_new ();
|
sl@0
|
427 |
|
sl@0
|
428 |
crawler_array = g_ptr_array_new ();
|
sl@0
|
429 |
|
sl@0
|
430 |
main_loop = g_main_loop_new (NULL, FALSE);
|
sl@0
|
431 |
|
sl@0
|
432 |
for (i = 0; i < NTHREADS; i++)
|
sl@0
|
433 |
create_adder_thread ();
|
sl@0
|
434 |
|
sl@0
|
435 |
/* Wait for all threads to start
|
sl@0
|
436 |
*/
|
sl@0
|
437 |
g_mutex_lock (context_array_mutex);
|
sl@0
|
438 |
|
sl@0
|
439 |
if (context_array->len < NTHREADS)
|
sl@0
|
440 |
g_cond_wait (context_array_cond, context_array_mutex);
|
sl@0
|
441 |
|
sl@0
|
442 |
g_mutex_unlock (context_array_mutex);
|
sl@0
|
443 |
|
sl@0
|
444 |
for (i = 0; i < NCRAWLERS; i++)
|
sl@0
|
445 |
create_crawler ();
|
sl@0
|
446 |
|
sl@0
|
447 |
g_timeout_add (RECURSER_TIMEOUT, recurser_start, NULL);
|
sl@0
|
448 |
|
sl@0
|
449 |
g_main_loop_run (main_loop);
|
sl@0
|
450 |
g_main_loop_unref (main_loop);
|
sl@0
|
451 |
|
sl@0
|
452 |
#endif
|
sl@0
|
453 |
#ifdef __SYMBIAN32__
|
sl@0
|
454 |
testResultXml("mainloop-test");
|
sl@0
|
455 |
#endif /* EMULATOR */
|
sl@0
|
456 |
|
sl@0
|
457 |
return 0;
|
sl@0
|
458 |
}
|