aboutsummaryrefslogtreecommitdiffstats
path: root/tests/data/small-client-core.h
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2021-07-21 16:32:36 -0500
committerDaniel Stone <daniels@collabora.com>2021-08-07 11:53:23 +0000
commit0e0274af0c9f60d2759713df136f4294054c9096 (patch)
treee5eb0b0f359abc61f8e7d8f9d429f5fa995530a8 /tests/data/small-client-core.h
parentclient: Add new proxy marshalling functions with flags (diff)
downloadwayland-0e0274af0c9f60d2759713df136f4294054c9096.tar
wayland-0e0274af0c9f60d2759713df136f4294054c9096.tar.gz
wayland-0e0274af0c9f60d2759713df136f4294054c9096.tar.bz2
wayland-0e0274af0c9f60d2759713df136f4294054c9096.tar.lz
wayland-0e0274af0c9f60d2759713df136f4294054c9096.tar.xz
wayland-0e0274af0c9f60d2759713df136f4294054c9096.tar.zst
wayland-0e0274af0c9f60d2759713df136f4294054c9096.zip
scanner: Use the new atomic marshal/destroy function
Use the new flagged marshal+destroy function in generated code. It's intended as a replacement for all existing wl_proxy_marshal_* functions, so I've used it to replace them all. This results in a large update to the scanner test files as well. We now pass the new WL_MARSHAL_FLAG_DESTROY flag when appropriate, so the race condition in #86 caused by releasing the display mutex between marshalling the proxy and destroying the proxy is now gone. Fixes #86 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'tests/data/small-client-core.h')
-rw-r--r--tests/data/small-client-core.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/data/small-client-core.h b/tests/data/small-client-core.h
index d424757..348d2dc 100644
--- a/tests/data/small-client-core.h
+++ b/tests/data/small-client-core.h
@@ -159,8 +159,8 @@ intf_A_rq1(struct intf_A *intf_A, const struct wl_interface *interface, uint32_t
{
struct wl_proxy *untyped_new;
- untyped_new = wl_proxy_marshal_constructor_versioned((struct wl_proxy *) intf_A,
- INTF_A_RQ1, interface, version, interface->name, version, NULL);
+ untyped_new = wl_proxy_marshal_flags((struct wl_proxy *) intf_A,
+ INTF_A_RQ1, interface, version, 0, interface->name, version, NULL);
return (void *) untyped_new;
}
@@ -173,8 +173,8 @@ intf_A_rq2(struct intf_A *intf_A, const char *str, int32_t i, uint32_t u, wl_fix
{
struct wl_proxy *typed_new;
- typed_new = wl_proxy_marshal_constructor((struct wl_proxy *) intf_A,
- INTF_A_RQ2, &intf_not_here_interface, NULL, str, i, u, f, fd, obj);
+ typed_new = wl_proxy_marshal_flags((struct wl_proxy *) intf_A,
+ INTF_A_RQ2, &intf_not_here_interface, wl_proxy_get_version((struct wl_proxy *) intf_A), 0, NULL, str, i, u, f, fd, obj);
return (struct intf_not_here *) typed_new;
}
@@ -185,10 +185,8 @@ intf_A_rq2(struct intf_A *intf_A, const char *str, int32_t i, uint32_t u, wl_fix
static inline void
intf_A_destroy(struct intf_A *intf_A)
{
- wl_proxy_marshal((struct wl_proxy *) intf_A,
- INTF_A_DESTROY);
-
- wl_proxy_destroy((struct wl_proxy *) intf_A);
+ wl_proxy_marshal_flags((struct wl_proxy *) intf_A,
+ INTF_A_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) intf_A), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus