wayland/tests
Kristian Høgsberg 53d24713a3 Change filedescriptor API to be thread safe
The update callback for the file descriptors was always a bit awkward and
un-intuitive.  The idea was that whenever the protocol code needed to
write data to the fd it would call the 'update' function.  This function
would adjust the mainloop so that it polls for POLLOUT on the fd so we
can eventually flush the data to the socket.

The problem is that in multi-threaded applications, any thread can issue
a request, which writes data to the output buffer and thus triggers the
update callback.  Thus, we'll be calling out with the display mutex
held and may call from any thread.

The solution is to eliminate the udpate callback and just require that
the application or server flushes all connection buffers before blocking.
This turns out to be a simpler API, although we now require clients to
deal with EAGAIN and non-blocking writes.  It also saves a few syscalls,
since the socket will be writable most of the time and most writes will
complete, so we avoid changing epoll to poll for POLLOUT, then write and
then change it back for each write.
2012-10-10 20:59:00 -04:00
..
.gitignore tests: update gitignore 2012-05-29 10:10:07 -04:00
array-test.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
client-test.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
connection-test.c Change filedescriptor API to be thread safe 2012-10-10 20:59:00 -04:00
event-loop-test.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
exec-fd-leak-checker.c tests: support testing fd inheritance over exec 2012-04-20 15:06:27 +03:00
fixed-benchmark.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
fixed-test.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
list-test.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
Makefile.am tests: test that path names longer than 108 bytes are rejected 2012-06-30 20:01:20 +00:00
map-test.c tests: fix make check for out-of-tree builds 2012-06-30 19:58:37 +00:00
os-wrappers-test.c Change filedescriptor API to be thread safe 2012-10-10 20:59:00 -04:00
sanity-test.c tests: ensure sanity leak check tests pass when leak checks are disabled. 2012-08-29 14:10:24 -04:00
socket-test.c tests: Quiet warning 2012-08-29 14:12:11 -04:00
test-helpers.c tests: support testing fd inheritance over exec 2012-04-20 15:06:27 +03:00
test-runner.c tests: ensure sanity leak check tests pass when leak checks are disabled. 2012-08-29 14:10:24 -04:00
test-runner.h tests: support testing fd inheritance over exec 2012-04-20 15:06:27 +03:00