Unused druntime code: Barrier, ReadWriteMutex, Condition

Denis Feklushkin feklushkin.denis at gmail.com
Tue Jun 16 10:48:10 UTC 2026


On Tuesday, 16 June 2026 at 10:38:27 UTC, Richard (Rikki) Andrew 
Cattermole wrote:

>> I.e., core.stdc shouldn't be necessary.
>> 
>> Let the druntime use these functions through wrapper 
>> functions. There will be only about 10 of them in total, I 
>> think: malloc/free, some sync methods...
>> 
>> This will solve 95% of porting issues to any system
>
> Chuck it into a module called core.internal.platform and sure.
>
> You shouldn't need wrapper functions for the most part. Aliases 
> will suffice. I.e. malloc is perfectly fine as an API, just 
> needs a different name so it can be swapped out easily.

Yes, maybe aliases. Point is in restrictions for druntime 
developers to avoid them to use core.stdc functions directly 
exept available ~10 aliases, same on all platforms, same for 
Posix, non-Posix, with libc or without - this doesn't matter


More information about the Digitalmars-d mailing list