Martin Wilck <mwilck(a)freenet.de> writes:
Do you _really_ consider it "clean" to use the WSAOVERLAPPED fields for arbitrary, unrelated Wine-internal data?
Not really, but this is apparently what Windows does. And I consider it better than having kernel32 file I/O code know about winsock specifics any more than necessary.
The only way to avoid these (admittedly unelegant) constructs is to use yet more function pointers, like
ovl->call_completion_func (ovl);
where ovl->call_completion_func would be a function that "knew" the number of arguments to pass to te completion function.
Another way is to have a completion_func inside of winsock that takes 3 args and in turn calls the user-specified func that takes 4 args. This way synchro.c does not need to know about it at all.
As I said in the last mail, since we are talking about only 2 alternatives, the use of function pointers may be more elegant, but a little exaggerated to my taste.
The basic infrastructure has to be generic enough to support all kinds of async I/O. If it cannot it should be improved, but we must not work around the lack of generality by adding winsock-specific hacks in the kernel layers. -- Alexandre Julliard julliard(a)winehq.com