This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: rsync over ssh hang issue understood


On 07 July 2006 01:31, Darryl Miles wrote:

> Dave Korn wrote:
>> On 06 July 2006 23:02, Darryl Miles wrote:
>>> However according to MSDN this function is undocumented.
>> 
>>   No, it's documented in the DDK these days.
>> 
>>
http://msdn.microsoft.com/library/en-us/Kernel_r/hh/Kernel_r/k111_822ab812-a64
4-4574-8d89-c4ebf5b17ea5.xml.asp?frame=true
>> 
>> (ZwQueryInformationFile == NtQueryInformationFile)
> 
> Please explain the relevance for the uninitiated.
> 
> The Zw stuff looks like Device Drive APIs, where as we want
> Userspace/Application APIs.

  As I said before, 

ZwQueryInformationFile == NtQueryInformationFile.

> There is no documented type for
> FILE_INFORMATION_CLASS=FilePipeLocalInformation in the Zw functions.

  If it works in NtXxx it works in ZwXxxx.
 
> So my stance is still the same.  A MS rocket scientist is still
> necessary requirement to continue with the existing approach.  The
> rocket scientist will understand things that mere mortals wont :).

  No, someone with kernel and NT native API experience is a necessary
requirement  :)  So, let me continue:

  The Nt Native API is available to both Win32 and kernel-mode programs - in
fact, the win32 api is built on the native API.  For user mode programs, the
Nt and Zw versions of the function are identical, different symbols pointing
to the same address in ntdll.dll, which loads a pointer to the arguments into
%edx and the syscall number for Nt/ZwQueryInformationFile into %eax and enters
the kernel syscall dispatcher through int 0x2e.  In ntoskrnl.exe itself, which
is what kernel-mode drivers link directly against rather than against the
ntdll.dll shim functions, there are also Nt and Zw versions of each symbol;
the Zw version re-enters via the int 0x2e trap gate, whereas the Nt version is
the actual underlying function code which the system service dispatcher
invoked by int 0x2e eventually dispatches through after looking it up in the
KiSystemServiceTable.

> Maybe you are in a better position to share more insight into the
> situation (specifically about the use of NtQueryInformationFile in
> addressing the writability semantics of the POSIX select/poll/write
> event system).

  I think you should just use it and it should just work.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]