libpdx_uds: Serialize access to connection socket between threads
Added a mutex to allow only one client thread to perform atomic
send-request/receive-responce actions.
Also added a unit test that perfroms multiple parallel client requests
to the same service to ensure it can handle multithreaded access
correctly.
Bug: 37443070
Test: `libpdx_uds_tests` pass
Change-Id: Ica516f7806f9146fb530b5cb371d2ee89146fed7
diff --git a/libs/vr/libpdx_uds/Android.bp b/libs/vr/libpdx_uds/Android.bp
index f2bcc0c..cfc2022 100644
--- a/libs/vr/libpdx_uds/Android.bp
+++ b/libs/vr/libpdx_uds/Android.bp
@@ -35,6 +35,7 @@
"-Werror",
],
srcs: [
+ "client_channel_tests.cpp",
"ipc_helper_tests.cpp",
"remote_method_tests.cpp",
"service_framework_tests.cpp",