Skip to content

Conversation

tmancill
Copy link

@tmancill tmancill commented May 4, 2022

Hi @headius . Thank you for the quick response. The constants generated match the bitmasks we ended up hardcoding into our application for O_DIRECT, so the values have been tested in situ.

A few comments/questions (somewhat) related to this PR:

  1. The regen:platform resulted in updates to AddressFamily.java and ProtocolFamily.java on Linux x86_64 and aarch64. Since they aren't directly related to this change, I left them out. Should I include them? Should I submit a separate PR?

  2. When I run on Apple M1 (uname -sm -> Darwin arm64), it creates a new directory src/main/java/jnr/constants/platform/darwin/x86_64/. I was expecting it to generate darwin/aarch64. I assume this is a quirk of the M1. O_DIRECT isn't defined on Darwin, so it doesn't matter for this PR anyway.

  3. When I ran rake regen:lplatform on Linux x86_64, it creates a new folder src/main/java/jnr/constants/platform/linux/x86_64/, which seems correct. Running rake regen:platform updates ``src/main/java/jnr/constants/platform/linux/`. Is the use of the latter a convention?

@ahorek
Copy link
Contributor

ahorek commented Jul 7, 2022

btw https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyFile.java#L198 should be updated as well to make it available from JRuby

File::DIRECT => 16384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants