mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-15 00:36:19 +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
|
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
||||||
script:
|
script:
|
||||||
# FIXME: Add --werror
|
# 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}
|
- meson ${MESON_COMMON_OPTIONS}
|
||||||
|
--wrap-mode=default
|
||||||
_build
|
_build
|
||||||
- ninja -C _build
|
- ninja -C _build
|
||||||
# FIXME: Multiple unit tests currently fails
|
# FIXME: Multiple unit tests currently fails
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <glib/glib.h>
|
#include <glib/glib.h>
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <malloc.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "../giowin32-private.c"
|
#include "../giowin32-private.c"
|
||||||
|
|
||||||
|
@ -39,26 +39,18 @@ struct _GRealThread
|
|||||||
/* system thread implementation (gthread-posix.c, gthread-win32.c) */
|
/* system thread implementation (gthread-posix.c, gthread-win32.c) */
|
||||||
|
|
||||||
/* Platform-specific scheduler settings for a thread */
|
/* Platform-specific scheduler settings for a thread */
|
||||||
typedef struct _GThreadSchedulerSettings GThreadSchedulerSettings;
|
typedef struct
|
||||||
|
{
|
||||||
/* TODO: Add the same for macOS and the BSDs */
|
|
||||||
#if defined(HAVE_SYS_SCHED_GETATTR)
|
#if defined(HAVE_SYS_SCHED_GETATTR)
|
||||||
/* This is for modern Linux */
|
/* This is for modern Linux */
|
||||||
struct _GThreadSchedulerSettings
|
|
||||||
{
|
|
||||||
struct sched_attr *attr;
|
struct sched_attr *attr;
|
||||||
};
|
|
||||||
|
|
||||||
#define HAVE_GTHREAD_SCHEDULER_SETTINGS 1
|
|
||||||
|
|
||||||
#elif defined(G_OS_WIN32)
|
#elif defined(G_OS_WIN32)
|
||||||
struct _GThreadSchedulerSettings
|
|
||||||
{
|
|
||||||
gint thread_prio;
|
gint thread_prio;
|
||||||
};
|
#else
|
||||||
|
/* TODO: Add support for macOS and the BSDs */
|
||||||
#define HAVE_GTHREAD_SCHEDULER_SETTINGS 1
|
void *dummy;
|
||||||
#endif
|
#endif
|
||||||
|
} GThreadSchedulerSettings;
|
||||||
|
|
||||||
void g_system_thread_wait (GRealThread *thread);
|
void g_system_thread_wait (GRealThread *thread);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user