mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Merge branch 'wip/pwithnall/thread-settings-fixes' into 'master'
gthread: Ensure GThreadSchedulerSettings is always defined See merge request GNOME/glib!1334
This commit is contained in:
commit
33ee190b3d
@ -366,7 +366,13 @@ macos:
|
||||
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
||||
script:
|
||||
# FIXME: Add --werror
|
||||
# FIXME: Use --wrap-mode=default so we download dependencies each time,
|
||||
# until the macOS runner is a VM where we can use a pre-made image which
|
||||
# already contains the dependencies. See:
|
||||
# - https://gitlab.gnome.org/GNOME/glib/merge_requests/388
|
||||
# - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225
|
||||
- meson ${MESON_COMMON_OPTIONS}
|
||||
--wrap-mode=default
|
||||
_build
|
||||
- ninja -C _build
|
||||
# FIXME: Multiple unit tests currently fails
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <glib/glib.h>
|
||||
#include <gio/gio.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../giowin32-private.c"
|
||||
|
||||
|
@ -39,26 +39,18 @@ struct _GRealThread
|
||||
/* system thread implementation (gthread-posix.c, gthread-win32.c) */
|
||||
|
||||
/* Platform-specific scheduler settings for a thread */
|
||||
typedef struct _GThreadSchedulerSettings GThreadSchedulerSettings;
|
||||
|
||||
/* TODO: Add the same for macOS and the BSDs */
|
||||
typedef struct
|
||||
{
|
||||
#if defined(HAVE_SYS_SCHED_GETATTR)
|
||||
/* This is for modern Linux */
|
||||
struct _GThreadSchedulerSettings
|
||||
{
|
||||
/* This is for modern Linux */
|
||||
struct sched_attr *attr;
|
||||
};
|
||||
|
||||
#define HAVE_GTHREAD_SCHEDULER_SETTINGS 1
|
||||
|
||||
#elif defined(G_OS_WIN32)
|
||||
struct _GThreadSchedulerSettings
|
||||
{
|
||||
gint thread_prio;
|
||||
};
|
||||
|
||||
#define HAVE_GTHREAD_SCHEDULER_SETTINGS 1
|
||||
#else
|
||||
/* TODO: Add support for macOS and the BSDs */
|
||||
void *dummy;
|
||||
#endif
|
||||
} GThreadSchedulerSettings;
|
||||
|
||||
void g_system_thread_wait (GRealThread *thread);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user