char-pty: remove write_lock usage
commitf7ea2038bea04628eaa55156fc34edf9d0c4a2bb
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 6 Feb 2019 17:43:28 +0000 (6 18:43 +0100)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 13 Feb 2019 15:46:39 +0000 (13 16:46 +0100)
tree91c96684bcaab9d68119fe4b495baacbea3cd6e1
parentf8278c7d74c6b92b3dbbd6636d6e8917d6050378
char-pty: remove write_lock usage

The lock usage was described with its introduction in commit
9005b2a7589540a3733b3abdcfbccfe7746cd1a1. It was necessary because PTY
write() shares more state than GIOChannel with other
operations.

This made char-pty a bit different from other chardev, that only lock
around the write operation.  This was apparent in commit
7b3621f47a990c5099c6385728347f69a8d0e55c, which introduced an idle
source to avoid the lock.

By removing the PTY chardev state sharing on write() with previous
patch, we can remove the lock and the idle source.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190206174328.9736-7-marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
chardev/char-pty.c