With this adaption the probability that a message will be written
completely is higher.
On high load there are 647x/sec EAGAIN failures without this patch
and 570x/sec failures with this patch.
(The "JackClientSocket::Write time out" log messages were counted when
simulating continuously Xruns.)
In case of EAGAIN failures the message will now completely ignored.
Therefore it the socket stream will only contain complete messages
and no partly written messages. Such partly written messages would be
interpreted wrongly by the reader and the reader would detect the start
of the next message in the middle of the message. This could result in
"Unknown request" error logs but could also end up with assertions due
to request attributes which are out of range.
When using POST_PACKED_STRUCTURE JackRequest structures would be
aligned to 64b on aarch64 due to packing is disabled on aarch64 in
systemdeps, this causes issues with decoding some JackRequests. To
overcome this issue by defining POST_PACKED_STRUCTURE_FORCED_AARCH64
which is not undefed for aarch64.
It is only used for JackRequest structures, since enabling for all uses
cases in Jack jackd startup failed with "Bus Error".
Change-Id: I9460840f11870bb699744da09a5dcacddb828d2c
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>