mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 10:57:53 +02:00
Add runtime checks and a fallback if we can't get the thread scheduler settings
On Linux the sched_getattr syscall might be available at compile-time but not actually work at runtime (e.g. because an older kernel is running or valgrind is used). Instead of killing the process, return FALSE and handle this gracefully at runtime with some fallback code. Fixes https://gitlab.gnome.org/GNOME/glib/issues/2007
This commit is contained in:
@@ -74,7 +74,7 @@ void g_system_thread_free (GRealThread *thread);
|
||||
void g_system_thread_exit (void);
|
||||
void g_system_thread_set_name (const gchar *name);
|
||||
|
||||
void g_system_thread_get_scheduler_settings (GThreadSchedulerSettings *scheduler_settings);
|
||||
gboolean g_system_thread_get_scheduler_settings (GThreadSchedulerSettings *scheduler_settings);
|
||||
|
||||
/* gthread.c */
|
||||
GThread *g_thread_new_internal (const gchar *name,
|
||||
@@ -85,7 +85,7 @@ GThread *g_thread_new_internal (const gchar *name,
|
||||
const GThreadSchedulerSettings *scheduler_settings,
|
||||
GError **error);
|
||||
|
||||
void g_thread_get_scheduler_settings (GThreadSchedulerSettings *scheduler_settings);
|
||||
gboolean g_thread_get_scheduler_settings (GThreadSchedulerSettings *scheduler_settings);
|
||||
|
||||
gpointer g_thread_proxy (gpointer thread);
|
||||
|
||||
|
Reference in New Issue
Block a user