mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 04:58:01 +02:00
shared/tests: add nmtst_g_source_set_boolean_true() helper
(cherry picked from commit0008c6c801) (cherry picked from commit421844c89c)
This commit is contained in:
parent
a7f451a2b3
commit
52bd1d8cef
1 changed files with 20 additions and 0 deletions
|
|
@ -981,6 +981,26 @@ nmtst_rand_perm_gslist (GRand *rand, GSList *list)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static inline gboolean
|
||||||
|
nmtst_g_source_assert_not_called (gpointer user_data)
|
||||||
|
{
|
||||||
|
g_assert_not_reached ();
|
||||||
|
return G_SOURCE_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline gboolean
|
||||||
|
nmtst_g_source_set_boolean_true (gpointer user_data)
|
||||||
|
{
|
||||||
|
gboolean *ptr = user_data;
|
||||||
|
|
||||||
|
g_assert (ptr);
|
||||||
|
g_assert (!*ptr);
|
||||||
|
*ptr = TRUE;
|
||||||
|
return G_SOURCE_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
_nmtst_main_loop_run_timeout (gpointer user_data)
|
_nmtst_main_loop_run_timeout (gpointer user_data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue