Remove PAL_Random and move palrt APIs into the minipal#108999
Remove PAL_Random and move palrt APIs into the minipal#108999jkoritzinsky merged 30 commits intodotnet:mainfrom
Conversation
…the CoreCLR PAL to also use it. Also remove dangling references to DNCP and remove dead standalone-DNMD infra
… minipal implementation)
| { | ||
| #endif // __cplusplus | ||
|
|
||
| typedef struct minipal_guid__ |
There was a problem hiding this comment.
nit:
| typedef struct minipal_guid__ | |
| typedef struct |
There was a problem hiding this comment.
We get a slightly better experience in debuggers by giving a name to the struct instead of just naming the typedef (without the name on the struct, you just get "anonymous struct" which is a little annoying).
…l guid API instead of having three separate implementation of the exact same function body
…(we'll figure out standalone DNMD later)
| #endif // __cplusplus | ||
|
|
||
| #ifndef HOST_WINDOWS | ||
| inline void* CoTaskMemAlloc(size_t cb) |
There was a problem hiding this comment.
cc @lambdageek, who originally suggested adding a minipal_ prefix to all minipal APIs for clarity on their source. Up to now, all minipal APIs have consistently followed this naming convention.
There was a problem hiding this comment.
Should this be called minicom or something to make it clear that it is not minipal proper?
There was a problem hiding this comment.
There was a problem hiding this comment.
I can move this into the minipal/com directory where I initially had it to make that more clear.
There was a problem hiding this comment.
Yeah I'll do that and move this back to that subfolder.
There was a problem hiding this comment.
Looks like the subfolder work is in the DNMD PR itself, so that would be more complicated than necessary here. I'll just prefix it with minicom_ and go back to having an implementation on each platform.
There was a problem hiding this comment.
I meant that the include file should be called minicom. I did not mean to prefix the COM defs with it. We would not be able to apply the prefix for whatever is used in MIDL generated files that will lead to inconsistencies.
There was a problem hiding this comment.
Okay I'll move it into a subdirectory instead and set up that like I was planning on doing with DNMD.
|
/ba-g failure is deadletter |
Change usages of PAL_Random to instead use the minipal's random bytes APIs.
Move the remaining palrt APIs to the minipal to make them more easily usable outside of CoreCLR's PAL (and also to shrink the CoreCLR PAL). This work was spurred by #107961, where I realized that the set of Win32-like APIs that DNMD needs is equivalent to the set of Win32 API shims provided by palrt. To simplify things, I just decided to move the palrt implementations (with implementations that defer to the abstracted APIs on Windows) to the minipal and remove the palrt component.
Mostly extracted from #107961 when refactoring the new minipal APIs.