-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove PAL_Random and move palrt APIs into the minipal #108999
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
typedef struct minipal_guid__ | |
typedef struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
src/native/minipal/memory.h
Outdated
#endif // __cplusplus | ||
|
||
#ifndef HOST_WINDOWS | ||
inline void* CoTaskMemAlloc(size_t cb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be called minicom or something to make it clear that it is not minipal proper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'll do that and move this back to that subfolder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.