LIU Hao wrote:
> 在 2026-5-5 21:29, Kirill Makurin 写道:
>> What do you thing about formatting at least winpthreads' tests? No one has
>> touched them in more than a decade, so I think it won't be a big issue.
>>
>> I also can try to reduce amount of formatting changes to minimum in other
>> files:
>>
>> - replace hard tabs with spaces for indentation
>> - remove extra whitespace
>
> These are fine.
>
>> I used "breaking changes" in that context to mean changes which will make it
>> harder to backport things. I don't have plans for any user-visible API/ABI
>> breaks. Some of changes I have in mind are:
>
> - add comments for most static functions, so people who read the code have an
> idea what they are doing
> - move some stuff around within source files, so related functions are
> located close to each other
> - rename some internal functions and structure field names to improve
> readability
>
> Maybe these are fine, too. Honestly, I don't mind such changes.
I was thinking to format winpthreads' sources as one big preparation step for
all other changes. Probably the biggest changes that I have locally are always
having braces with conditional construct. So, instead of
```
if (expr)
something
```
it would be
```
if (expr) {
something
}
```
It makes pieces or code like this more readable:
```
...
if (expr)
...
...
```
So it's clear where conditional logic ends.
> First of all, there's absolutely no reason to use spinlocks in user mode:
> https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723
Good point, but I still think it is valuable to provide working implementation.
Also, at least winpthreads' itself uses spinlocks internally.
> And second, are there really people who compile code with GCC for Windows NT
> 3.1?
I think at this point this is the only practical way to do it; I don't think
anyone would use ancient MSVC tools. Another reason is that I want to port my
posix32 library to Windows version older than XP, and since it depends on
winpthreads, I need it to run on those ancient Windows versions as well.
- Kirill Makurin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public