Patch to fix GetThreadTimes() to work for all threads - fixes Bug 20230

Ray Hinchliffe (RH) ray at rh-software.com
Tue Apr 19 02:44:17 CDT 2011


Hi,

I felt I should try and fix the patch anyway, so here is my revised one.  I
do not know how to tell git to exclude the generated files, so I edited
those changes out. I have attached both before and after patch files.

I wish I had known about server/protocol.def before as it makes things much
easier.

Regards,
Ray

-----Original Message-----
From: Vitaliy Margolen [mailto:wine-devel at kievinfo.com] 
Sent: 19 April 2011 06:17
To: wine-devel at winehq.org
Cc: Ray Hinchliffe (RH)
Subject: Re: Patch to fix GetThreadTimes() to work for all threads - fixes
Bug 20230

On 04/18/2011 12:45 AM, Ray Hinchliffe (RH) wrote:
> The patch works by reading from /proc/<pid>/task/<tid>/stat. If this in
not
> possible it will report the fix messages as before.
> Given that SystemProcessorPerformanceInformation uses /proc/stat I expect
this

Thanks for the patch, however there are several issues with it:
- Don't attach changes to automatically generated files (server/trace.c, 
server/request.h, etc). Only server/protocol.def should be included, which 
you didn't even modify.
- Keep formatting of the original file you modifying. No whitespace only 
changes, no funky new formatting styles.
- Please use Windows types instead of system types for integers (ULONG 
instead of unsigned long)

> +                    sprintf( buf, "/proc/%u/task/%u/stat",
reply->unix_pid, reply->unix_tid );
Please don't call any functions in the server call context. Also you not 
using this buffer if server call fails, or if the thread is the same.

Vitaliy.


More information about the wine-patches mailing list