> So, maybe new `winpthreads_table_*` functions should be in a new file named 
> table.c and table.h?

Ok, let's gor for it :)

> I also see that in 5/6, you implemented some intrinsics as static functions 
> in once.c. Maybe they would be better defined as static inline functions in a 
> header file, e.g. winpthreads-intrin.h, so other files could use them as well?

Yup, that's much better. I'll send a V2 patchset in a while. I also want to 
rebase on top of the latest changes by Pali Rohár

Best Regards!
Luca
________________________________
Da: Kirill Makurin <[email protected]>
Inviato: martedì 29 settembre 2026 01:13
A: [email protected] 
<[email protected]>
Oggetto: Re: [Mingw-w64-public] R: [PATCH 3/6] winpthreads: Add unordered table 
implementation

Luca Bacci <[email protected]> wrote:

> Hi Kirill, thanks for the review!
>
>> I consider moving contents of misc.c to other files and remove it completely 
>> in future changes
>
> May I ask why? There are utilities like 
> pthread_wait_for_{single,multiple}_object which are used by many TUs. I was 
> thinking about using winpthreads_table_t to optimize condition variables, 
> which is why I added the code in misc.c

Sorry, I should have given more details.

You probably saw me updating mutex-related stuff this past month. I plan 
various global systematic changes in winpthreads, updating one "module" after 
another. It'll take some time, obviously; I don't want to update multiple 
things at the same time.

About misc.c. Currently, it mostly contains time-related stuff and wrappers 
such as `_pthread_wait_for_{single,multiple}_object` that you mentioned above. 
I think time-related stuff (including contents of nanosleep.c and clock.c) all 
should be in single file, e.g. time.c; while wrappers like 
`_pthread_wait_for_{single,multiple}_object` and similar would be in another 
file, e.g. sync.c.

So, maybe new `winpthreads_table_*` functions should be in a new file named 
table.c and table.h? Btw, I like that you chose `winpthreads_*` as the naming 
convention; I want to rename internal functions with external linking to use 
"winpthreads_" as their prefix.

I also see that in 5/6, you implemented some intrinsics as static functions in 
once.c. Maybe they would be better defined as static inline functions in a 
header file, e.g. winpthreads-intrin.h, so other files could use them as well?

- Kirill Makurin

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

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

Reply via email to