Adam Jackson <a...@nwnk.net> writes:

> ISTR the server currently has a "write then read" strategy for deadlock
> avoidance (and accidentally better reliability when low on memory).  Do
> we want to do that here too, and if we do, do we split this into
> walking the list twice to enforce the order, in case a caller has both
> flags set?

There's no strong requirement, other than the server isn't allowed to
block on writes. I think what you're remembering is that X clients are
kindly requested to read when writes would block. Writing before reading
encourages deadlock in general, but does reduce buffering requirements.

We could enforce write-before-read ordering here by removing the read
flag from the mask when the write flag was set so that subsystems using
both read and write wouldn't wake while waiting for write
space.

However, given that one use of this function is for nested X servers
where the socket in question is an X client connection which requires
read-before-write behavior, I think it's pretty clear that we'll want to
leave this kind of policy decision to the subsystem using the fds.

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to