delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/05/17:56:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 5 Jul 2002 17:55:45 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: /proc/uptime etc. - NtQuerySystemInformation() needs bigger structure
Message-ID: <20020705215545.GB18639@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <E17QTq3-0004vt-0X AT anchor-post-33 DOT mail DOT demon DOT net> <004f01c22449$91da71a0$0100a8c0 AT advent02> <20020705200207 DOT GA11696 AT redhat DOT com> <016401c22464$c81034b0$0100a8c0 AT advent02>
Mime-Version: 1.0
In-Reply-To: <016401c22464$c81034b0$0100a8c0@advent02>
User-Agent: Mutt/1.3.23.1i

On Fri, Jul 05, 2002 at 09:44:38PM +0100, Chris January wrote:
>> >> --- winsup/cygwin/ntdll.h.old 2002-05-30 21:21:04.000000000 +0100
>> >> +++ winsup/cygwin/ntdll.h     2002-07-05 11:15:52.000000000 +0100
>> >> @@ -58,6 +58,7 @@ typedef struct _SYSTEM_PROCESSOR_TIMES
>> >>    LARGE_INTEGER DpcTime;
>> >>    LARGE_INTEGER InterruptTime;
>> >>    ULONG InterruptCount;
>> >> +  ULONG Unused;
>> >>  } SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES;
>> >>
>> >>  typedef LONG KPRIORITY;
>> >
>> >I will look at this patch tonight, but I would be grateful if you could
>> >answer the following questions:
>> >What version of binutils are you using?
>> >If you compiled Cygwin using just the 1.3.12 sources with no
>modifications,
>> >does /proc/uptime have any content?
>>
>> I think this is a symptom of the fact that gcc uses different alignment
>> than msvc.  If you add a __attribute__ ((aligned (8))) to the structure
>> it should "fix" the problem.
>>
>> This is one thing that was fixed by the -fnative-struct gcc option which
>> is, unfortunately, not available in gcc 3.1.
>I remember getting /proc working with aligned (4). Either I remember
>incorrectly or something strange is going on. Either way it would probably
>do no harm to explicitly set the alignment of the structures in ntdll.h

I wrote a little program to see what the difference was between gcc
2.95.3, gcc 3.1, and msvc.  2.95.3 could be coerced into setting similar
structure alignment to msvc.  I couldn't get the same behavior with 3.1
without setting an explicit alignment to 8.

I don't know what's going on here either, though.  I'm pretty sure that
I saw /proc/uptime working at one point.  I've tried this with different
versions of binutils, too.  It doesn't seem to have an effect.  Weird.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019