diff options
author | wangmy <wangmy@fujitsu.com> | 2021-03-31 22:28:01 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-18 11:37:25 +0100 |
commit | 54dff050027d5b9d20ff034b12bcacdfc010fa25 (patch) | |
tree | 8c53724446c3bf08407d5f241b63483712a001cb /meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch | |
parent | d7e0475b50c342f555daf4cb222311f8223529fd (diff) | |
download | poky-54dff050027d5b9d20ff034b12bcacdfc010fa25.tar.gz |
glib-2.0: upgrade 2.66.7 -> 2.68.0
the following patches are refreshed:
0001-Set-host_machine-correctly-when-building-with-mingw3.patch
0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch
0001-tests-codegen.py-removing-unecessary-print-statement.patch
relocate-modules.patch
the following patches are removed since they are included
in 2.68.0:
0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch
0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch
0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch
0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch
0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch
0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch
0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch
0010-kqueue-Fix-unlocked-access-to-shared-variable.patch
0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch
0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch
0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch
0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch
0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch
0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch
0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch
0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch
0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch
0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch
0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch
0024-tests-Add-comment-to-volatile-atomic-tests.patch
0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch
0026-gtype-Fix-some-typos-in-comments.patch
0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch
0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch
0029-docs-Document-not-to-use-volatile-qualifiers.patch
(From OE-Core rev: fde4cb18e28e98f934c0742292f7ec183a568233)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch b/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch deleted file mode 100644 index 8bc71a698d..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From ea746c79faf554d980c21b0e4381753e003d2dc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Withnall <pwithnall@endlessos.org> | ||
3 | Date: Wed, 11 Nov 2020 18:17:23 +0000 | ||
4 | Subject: [PATCH 03/29] tests: Fix non-atomic access to a shared variable | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | And drop the `volatile` qualifier from the variable, as that doesn’t | ||
10 | help with thread safety. | ||
11 | |||
12 | Signed-off-by: Philip Withnall <pwithnall@endlessos.org> | ||
13 | |||
14 | Helps: #600 | ||
15 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] | ||
16 | --- | ||
17 | glib/tests/mainloop.c | 20 ++++++++++---------- | ||
18 | 1 file changed, 10 insertions(+), 10 deletions(-) | ||
19 | |||
20 | diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c | ||
21 | index 16763a0ea..563a951de 100644 | ||
22 | --- a/glib/tests/mainloop.c | ||
23 | +++ b/glib/tests/mainloop.c | ||
24 | @@ -918,7 +918,7 @@ test_mainloop_overflow (void) | ||
25 | g_main_context_unref (ctx); | ||
26 | } | ||
27 | |||
28 | -static volatile gint ready_time_dispatched; | ||
29 | +static gint ready_time_dispatched; /* (atomic) */ | ||
30 | |||
31 | static gboolean | ||
32 | ready_time_dispatch (GSource *source, | ||
33 | @@ -964,7 +964,7 @@ test_ready_time (void) | ||
34 | /* A source with no ready time set should not fire */ | ||
35 | g_assert_cmpint (g_source_get_ready_time (source), ==, -1); | ||
36 | while (g_main_context_iteration (NULL, FALSE)); | ||
37 | - g_assert_false (ready_time_dispatched); | ||
38 | + g_assert_false (g_atomic_int_get (&ready_time_dispatched)); | ||
39 | |||
40 | /* The ready time should not have been changed */ | ||
41 | g_assert_cmpint (g_source_get_ready_time (source), ==, -1); | ||
42 | @@ -978,37 +978,37 @@ test_ready_time (void) | ||
43 | */ | ||
44 | g_source_set_ready_time (source, g_get_monotonic_time () + G_TIME_SPAN_DAY); | ||
45 | while (g_main_context_iteration (NULL, FALSE)); | ||
46 | - g_assert_false (ready_time_dispatched); | ||
47 | + g_assert_false (g_atomic_int_get (&ready_time_dispatched)); | ||
48 | /* Make sure it didn't get reset */ | ||
49 | g_assert_cmpint (g_source_get_ready_time (source), !=, -1); | ||
50 | |||
51 | /* Ready time of -1 -> don't fire */ | ||
52 | g_source_set_ready_time (source, -1); | ||
53 | while (g_main_context_iteration (NULL, FALSE)); | ||
54 | - g_assert_false (ready_time_dispatched); | ||
55 | + g_assert_false (g_atomic_int_get (&ready_time_dispatched)); | ||
56 | /* Not reset, but should still be -1 from above */ | ||
57 | g_assert_cmpint (g_source_get_ready_time (source), ==, -1); | ||
58 | |||
59 | /* A ready time of the current time should fire immediately */ | ||
60 | g_source_set_ready_time (source, g_get_monotonic_time ()); | ||
61 | while (g_main_context_iteration (NULL, FALSE)); | ||
62 | - g_assert_true (ready_time_dispatched); | ||
63 | - ready_time_dispatched = FALSE; | ||
64 | + g_assert_true (g_atomic_int_get (&ready_time_dispatched)); | ||
65 | + g_atomic_int_set (&ready_time_dispatched, FALSE); | ||
66 | /* Should have gotten reset by the handler function */ | ||
67 | g_assert_cmpint (g_source_get_ready_time (source), ==, -1); | ||
68 | |||
69 | /* As well as one in the recent past... */ | ||
70 | g_source_set_ready_time (source, g_get_monotonic_time () - G_TIME_SPAN_SECOND); | ||
71 | while (g_main_context_iteration (NULL, FALSE)); | ||
72 | - g_assert_true (ready_time_dispatched); | ||
73 | - ready_time_dispatched = FALSE; | ||
74 | + g_assert_true (g_atomic_int_get (&ready_time_dispatched)); | ||
75 | + g_atomic_int_set (&ready_time_dispatched, FALSE); | ||
76 | g_assert_cmpint (g_source_get_ready_time (source), ==, -1); | ||
77 | |||
78 | /* Zero is the 'official' way to get a source to fire immediately */ | ||
79 | g_source_set_ready_time (source, 0); | ||
80 | while (g_main_context_iteration (NULL, FALSE)); | ||
81 | - g_assert_true (ready_time_dispatched); | ||
82 | - ready_time_dispatched = FALSE; | ||
83 | + g_assert_true (g_atomic_int_get (&ready_time_dispatched)); | ||
84 | + g_atomic_int_set (&ready_time_dispatched, FALSE); | ||
85 | g_assert_cmpint (g_source_get_ready_time (source), ==, -1); | ||
86 | |||
87 | /* Now do some tests of cross-thread wakeups. | ||
88 | -- | ||
89 | 2.30.1 | ||
90 | |||