mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 20:35:49 +01:00
don't try to use thread stuff unless G_THREADS_ENABLED
2000-12-12 Havoc Pennington <hp@pobox.com> * gmain.c (g_main_context_destroy): don't try to use thread stuff unless G_THREADS_ENABLED (g_main_context_query): ditto (g_main_context_check): ditto (g_main_loop_quit): ditto
This commit is contained in:
parent
9a8c33db5c
commit
9edb08492d
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-12 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_context_destroy): don't try to use thread stuff
|
||||||
|
unless G_THREADS_ENABLED
|
||||||
|
(g_main_context_query): ditto
|
||||||
|
(g_main_context_check): ditto
|
||||||
|
(g_main_loop_quit): ditto
|
||||||
|
|
||||||
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* ghash.c (g_hash_table_remove): return whether a value
|
* ghash.c (g_hash_table_remove): return whether a value
|
||||||
|
@ -514,6 +514,7 @@ g_main_context_destroy (GMainContext *context)
|
|||||||
|
|
||||||
g_mem_chunk_destroy (context->poll_chunk);
|
g_mem_chunk_destroy (context->poll_chunk);
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
if (g_thread_supported())
|
if (g_thread_supported())
|
||||||
{
|
{
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
@ -523,6 +524,7 @@ g_main_context_destroy (GMainContext *context)
|
|||||||
CloseHandle (context->wake_up_semaphore);
|
CloseHandle (context->wake_up_semaphore);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
g_free (context);
|
g_free (context);
|
||||||
}
|
}
|
||||||
@ -1735,7 +1737,9 @@ g_main_context_query (GMainContext *context,
|
|||||||
pollrec = pollrec->next;
|
pollrec = pollrec->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
context->poll_changed = FALSE;
|
context->poll_changed = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (timeout)
|
if (timeout)
|
||||||
{
|
{
|
||||||
@ -1791,13 +1795,13 @@ g_main_context_check (GMainContext *context,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
context->poll_waiting = FALSE;
|
context->poll_waiting = FALSE;
|
||||||
#endif /* G_THREADS_ENABLED */
|
|
||||||
|
|
||||||
/* If the set of poll file descriptors changed, bail out
|
/* If the set of poll file descriptors changed, bail out
|
||||||
* and let the main loop rerun
|
* and let the main loop rerun
|
||||||
*/
|
*/
|
||||||
if (context->poll_changed)
|
if (context->poll_changed)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif /* G_THREADS_ENABLED */
|
||||||
|
|
||||||
pollrec = context->poll_records;
|
pollrec = context->poll_records;
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -2093,8 +2097,10 @@ g_main_loop_quit (GMainLoop *loop)
|
|||||||
LOCK_LOOP (loop);
|
LOCK_LOOP (loop);
|
||||||
loop->is_running = FALSE;
|
loop->is_running = FALSE;
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
if (loop->sem_cond)
|
if (loop->sem_cond)
|
||||||
g_cond_broadcast (loop->sem_cond);
|
g_cond_broadcast (loop->sem_cond);
|
||||||
|
#endif
|
||||||
|
|
||||||
UNLOCK_LOOP (loop);
|
UNLOCK_LOOP (loop);
|
||||||
|
|
||||||
|
8
gmain.c
8
gmain.c
@ -514,6 +514,7 @@ g_main_context_destroy (GMainContext *context)
|
|||||||
|
|
||||||
g_mem_chunk_destroy (context->poll_chunk);
|
g_mem_chunk_destroy (context->poll_chunk);
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
if (g_thread_supported())
|
if (g_thread_supported())
|
||||||
{
|
{
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
@ -523,6 +524,7 @@ g_main_context_destroy (GMainContext *context)
|
|||||||
CloseHandle (context->wake_up_semaphore);
|
CloseHandle (context->wake_up_semaphore);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
g_free (context);
|
g_free (context);
|
||||||
}
|
}
|
||||||
@ -1735,7 +1737,9 @@ g_main_context_query (GMainContext *context,
|
|||||||
pollrec = pollrec->next;
|
pollrec = pollrec->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
context->poll_changed = FALSE;
|
context->poll_changed = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (timeout)
|
if (timeout)
|
||||||
{
|
{
|
||||||
@ -1791,13 +1795,13 @@ g_main_context_check (GMainContext *context,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
context->poll_waiting = FALSE;
|
context->poll_waiting = FALSE;
|
||||||
#endif /* G_THREADS_ENABLED */
|
|
||||||
|
|
||||||
/* If the set of poll file descriptors changed, bail out
|
/* If the set of poll file descriptors changed, bail out
|
||||||
* and let the main loop rerun
|
* and let the main loop rerun
|
||||||
*/
|
*/
|
||||||
if (context->poll_changed)
|
if (context->poll_changed)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif /* G_THREADS_ENABLED */
|
||||||
|
|
||||||
pollrec = context->poll_records;
|
pollrec = context->poll_records;
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -2093,8 +2097,10 @@ g_main_loop_quit (GMainLoop *loop)
|
|||||||
LOCK_LOOP (loop);
|
LOCK_LOOP (loop);
|
||||||
loop->is_running = FALSE;
|
loop->is_running = FALSE;
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
if (loop->sem_cond)
|
if (loop->sem_cond)
|
||||||
g_cond_broadcast (loop->sem_cond);
|
g_cond_broadcast (loop->sem_cond);
|
||||||
|
#endif
|
||||||
|
|
||||||
UNLOCK_LOOP (loop);
|
UNLOCK_LOOP (loop);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user