在 2026-10-23 16:44, Kirill Makurin 写道:
LIU Hao wrote:

 > 在 2026-10-23 14:58, Kirill Makurin 写道:
 >> Yes, it is internal header file and is _not_ included from any public header file. So 
it is "main"
 >> include file during the build, and so is included from any source file as 
it contains global definitions
 >> and declarations used during the build.
 >>
>> So, I could clarify that it is "main" include file which contains global definitions used during the build.
 >
 > I mean, why does it have to be renamed? Why shouldn't it be named 
'globals.h' or 'utils.h', or just be
 > left 'misc.h'?

Before my time-related changes, misc.* contained a few time-related functions (moved to time.c, where they belong) and `_pthread_wait_*` wrappers; misc.c also had `winpthreads_init` function; misc.h had some unused and globally used macros.

My original plan was to move those functions to other, more suitable, source files and eventually remove misc.* completely. However, the only stuff that remains in misc.* now is what would go into such new file, and as the result it became "rename" rather than "move contents to some other file and then remove it".

Note that 0008.txt adds (and 0009.txt then uses) new macros to renamed winpthreads.h, and those macros ideally should be available in every compilation unit. IMO, a header file named winpthreads.h is better than misc.h, as the former would instantly catch attention by sharing name with the project. I wouldn't mind naming it winpthraeds-internal.h or something like this, if you think such name is better.

I have read all those patches, and it really looks like that that particular header should be named 'misc.h'; I hope that you have not renamed it.

As for this `WinpthreadsTimeImpl.SystemClock.Resolution = 16L * POW10_6;`, on Windows 9x where the system is driven by the DOS timer interrupt which has a frequency of roughly 18.2 Hz (the precise value is `14318180 / 12 / 65536`) and therefore the resolution is roughly 55 ms. I haven't verified this; you'd better verify it on a physical system.

And finally, `WinpthreadsSleep()` should not update `*remain` if the timeout is absolute. POSIX requires that 'the absolute clock_nanosleep() function has no effect on the structure referenced by rmtp.'

The other changes look good.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to