ReadFile and other issues

Alexandre Julliard julliard at
Wed Aug 22 13:51:42 CDT 2001

eric pouech <eric.pouech at> writes:

> fairly acceptable ;-) except that in line editing mode we need to lock
> the input buffer on a single thread (that's the way the queue is
> handled, 
> at least, on NT 2000 - didn't check the others) (the granularity for
> getting access to the queue is not the input record, but the line (up to
> '\n'))

I guess line editing could be done by wineconsole, and the input
records would only be sent to the server once we have a complete
line. Or do we need more locking than this?

> I was thinking of either a anonmymous file or an anonymous mapping for
> the content of the screen buffer... with an array attribute and char
> may be some additional info on each row to indicate the rendering
> program about the rows which have been modified...

The problem with a shared buffer is that you need to lock against
simultaneous access, which means a hung thread can hang the whole
console. I'd prefer to have the server simply report to wineconsole
the bounding rect of the screen buffer area that has been modified,
and have wineconsole use ReadConsoleOutput to retrieve the buffer
contents from the server. It's only a few Kbytes to copy at most so
performance should be acceptable.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list