-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono] Move basic w32file* and w32process* functions to eventpipe #66731
Conversation
They are not used by the rest of the runtime and we only need a bare minimum of w32process and w32file in eventpipe (e.g. no file share/access logic). Fix ep-test build and warnings, it was missing linking against libz and monoapi. Fix host vs. target confusion in ep-rt-mono.c
f0eac94
to
e82c20a
Compare
@@ -2224,7 +2483,7 @@ static const int64_t SECS_TO_NS = 1000000000; | |||
static const int64_t MSECS_TO_MIS = 1000; | |||
|
|||
/* clock_gettime () is found by configure on Apple builds, but its only present from ios 10, macos 10.12, tvos 10 and watchos 3 */ | |||
#if defined (HAVE_CLOCK_MONOTONIC) && (defined(TARGET_IOS) || defined(TARGET_OSX) || defined(TARGET_WATCHOS) || defined(TARGET_TVOS)) | |||
#if defined (HAVE_CLOCK_MONOTONIC) && (defined(HOST_IOS) || defined(HOST_OSX) || defined(HOST_WATCHOS) || defined(HOST_TVOS)) |
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.
isn't HOST_DARWIN
supposed to encompass all of these?
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.
Also: ios 10, macos 10.12, etc are pretty old. Do we still need this?
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.
Minimum supported macOS version is 10.15 in .NET 6, per https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#macos.
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.
Overall I think it looks great, nice work!. Most comments are formatting and some around adapting ported code to EventPipe types where possible.
Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
Fix more formatting. Move initialization of num_main_args after setting main_args so we can use it as a cheap guard value (not totally thread-safe but good enough for our purposes)
Move cmdline formatting back into object.c Fix bug return INVALID_HANDLE_VALUE instead of null in ep_rt_file_open_write
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.
LGTM!
…tnet#66731) They are not used by the rest of the runtime and we only need a bare minimum of w32process and w32file in eventpipe (e.g. no file share/access logic). Fix ep-test build and warnings, it was missing linking against libz and monoapi. Fix host vs. target confusion in ep-rt-mono.c Move initialization of num_main_args after setting main_args in object.c so we can use it as a cheap guard value (not totally thread-safe but good enough for our purposes). Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
They are not used by the rest of the runtime and we only need a bare minimum of w32process and w32file in eventpipe (e.g. no file share/access logic).
Fix ep-test build and warnings, it was missing linking against libz and monoapi.
Fix host vs. target confusion in ep-rt-mono.c