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

Vitaliy Margolen wine-devel at kievinfo.com
Tue Apr 19 00:16:47 CDT 2011


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-devel mailing list