mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-07 00:18:44 +02:00
Renamed g_thread_create to g_thread_create_full and added macro
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread.c, gthread.h: Renamed g_thread_create to g_thread_create_full and added macro g_thread_create, which omits 'stack_size', 'bound' and 'priority' parameters. Also removed 'bound' from GThread struct. * gthreadpool.h, gthreadpool.c: Adapted GThreadPool to the above changes. GThreadPool lost the 'priority' and 'bound' members. g_thread_pool_new the 'stack_size', 'bound' and 'priority' parameters. * tests/mainloop-test.c, tests/thread-test.c, tests/threadpool-test.c: Adapted to the above changes.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
a70206f177
commit
227d18bc46
@@ -267,8 +267,7 @@ create_adder_thread (void)
|
||||
sub_channels[0] = in_channels[0];
|
||||
sub_channels[1] = out_channels[1];
|
||||
|
||||
g_thread_create (adder_thread, sub_channels, 0,
|
||||
FALSE, TRUE, G_THREAD_PRIORITY_NORMAL, &err);
|
||||
g_thread_create (adder_thread, sub_channels, FALSE, &err);
|
||||
|
||||
if (err)
|
||||
{
|
||||
|
@@ -27,9 +27,8 @@ test_g_mutex (void)
|
||||
|
||||
g_assert (g_mutex_trylock (test_g_mutex_mutex));
|
||||
g_assert (G_TRYLOCK (test_g_mutex));
|
||||
thread = g_thread_create (test_g_mutex_thread,
|
||||
GINT_TO_POINTER (42),
|
||||
0, TRUE, TRUE, G_THREAD_PRIORITY_NORMAL, NULL);
|
||||
thread = g_thread_create (test_g_mutex_thread, GINT_TO_POINTER (42),
|
||||
TRUE, NULL);
|
||||
g_usleep (G_USEC_PER_SEC);
|
||||
test_g_mutex_int = 42;
|
||||
G_UNLOCK (test_g_mutex);
|
||||
@@ -68,8 +67,7 @@ test_g_static_rec_mutex (void)
|
||||
|
||||
g_assert (g_static_rec_mutex_trylock (&test_g_static_rec_mutex_mutex));
|
||||
thread = g_thread_create (test_g_static_rec_mutex_thread,
|
||||
GINT_TO_POINTER (42),
|
||||
0, TRUE, TRUE, G_THREAD_PRIORITY_NORMAL, NULL);
|
||||
GINT_TO_POINTER (42), TRUE, NULL);
|
||||
g_usleep (G_USEC_PER_SEC);
|
||||
g_assert (g_static_rec_mutex_trylock (&test_g_static_rec_mutex_mutex));
|
||||
g_usleep (G_USEC_PER_SEC);
|
||||
@@ -180,9 +178,7 @@ test_g_static_private (void)
|
||||
for (i = 0; i < THREADS; i++)
|
||||
{
|
||||
threads[i] = g_thread_create (test_g_static_private_thread,
|
||||
GINT_TO_POINTER (i),
|
||||
0, TRUE, TRUE,
|
||||
G_THREAD_PRIORITY_NORMAL, NULL);
|
||||
GINT_TO_POINTER (i), TRUE, NULL);
|
||||
}
|
||||
|
||||
/* Busy wait is not nice but that's just a test */
|
||||
@@ -269,8 +265,7 @@ test_g_static_rw_lock ()
|
||||
for (i = 0; i < THREADS; i++)
|
||||
{
|
||||
threads[i] = g_thread_create (test_g_static_rw_lock_thread,
|
||||
0, 0, TRUE, TRUE,
|
||||
G_THREAD_PRIORITY_NORMAL, NULL);
|
||||
NULL, TRUE, NULL);
|
||||
}
|
||||
g_usleep (G_USEC_PER_SEC);
|
||||
test_g_static_rw_lock_run = FALSE;
|
||||
|
@@ -32,12 +32,9 @@ main (int argc,
|
||||
guint i;
|
||||
g_thread_init (NULL);
|
||||
|
||||
pool1 = g_thread_pool_new (thread_pool_func, 3, 0, FALSE,
|
||||
G_THREAD_PRIORITY_NORMAL, FALSE, NULL, NULL);
|
||||
pool2 = g_thread_pool_new (thread_pool_func, 5, 0, FALSE,
|
||||
G_THREAD_PRIORITY_LOW, FALSE, NULL, NULL);
|
||||
pool3 = g_thread_pool_new (thread_pool_func, 7, 0, FALSE,
|
||||
G_THREAD_PRIORITY_LOW, TRUE, NULL, NULL);
|
||||
pool1 = g_thread_pool_new (thread_pool_func, NULL, 3, FALSE, NULL);
|
||||
pool2 = g_thread_pool_new (thread_pool_func, NULL, 5, TRUE, NULL);
|
||||
pool3 = g_thread_pool_new (thread_pool_func, NULL, 7, TRUE, NULL);
|
||||
|
||||
for (i = 0; i < RUNS; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user