diff options
| author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2017-01-24 16:34:28 +0200 |
|---|---|---|
| committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-01-25 13:46:23 +0200 |
| commit | 5e6eb032294ecdee889600c604dfcaab0ffb9398 (patch) | |
| tree | 9feb6fc39e33979a93ed4e4aadb6d84b68a61977 /Makefile.am | |
| parent | tests: Add a test for global filter (diff) | |
| download | wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.tar wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.tar.gz wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.tar.bz2 wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.tar.lz wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.tar.xz wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.tar.zst wayland-5e6eb032294ecdee889600c604dfcaab0ffb9398.zip | |
server: add a safer signal type and port wl_display to it
wl_list_for_each_safe, which is used by wl_signal_emit is not really
safe. If a signal has two listeners, and the first one removes and
re-inits the second one, it would enter an infinite loop, which was hit
in weston on resource destruction, which emits a signal.
This commit adds a new version of wl_signal, called wl_priv_signal,
which is private in wayland-server.c and which does not have this problem.
The old wl_signal cannot be improved without breaking backwards compatibility.
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'Makefile.am')
| -rw-r--r-- | Makefile.am | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index d78a0ca..d0c8bd3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,6 +159,7 @@ built_test_programs = \ socket-test \ queue-test \ signal-test \ + newsignal-test \ resources-test \ message-test \ headers-test \ @@ -226,6 +227,9 @@ queue_test_SOURCES = tests/queue-test.c queue_test_LDADD = libtest-runner.la signal_test_SOURCES = tests/signal-test.c signal_test_LDADD = libtest-runner.la +# wayland-server.c is needed here to access wl_priv_* functions +newsignal_test_SOURCES = tests/newsignal-test.c src/wayland-server.c +newsignal_test_LDADD = libtest-runner.la resources_test_SOURCES = tests/resources-test.c resources_test_LDADD = libtest-runner.la message_test_SOURCES = tests/message-test.c |
