Repository navigation
Log return codes instead of errno for Mach kernel functions - #3147
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🧰 Additional context used🧠 Learnings (4)📚 Learning: 2026-03-29T20:03:00.830ZApplied to files:
📚 Learning: 2026-04-06T04:45:47.644ZApplied to files:
📚 Learning: 2026-04-03T02:07:49.467ZApplied to files:
📚 Learning: 2026-04-06T21:48:11.921ZApplied to files:
🔇 Additional comments (5)
📝 WalkthroughWalkthroughThree macOS platform files were updated to replace Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3147 +/- ##
============================================
+ Coverage 62.17% 62.21% +0.04%
Complexity 12 12
============================================
Files 39 39
Lines 2329 2329
Branches 407 407
============================================
+ Hits 1448 1449 +1
+ Misses 774 770 -4
- Partials 107 110 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Mach kernel functions (
host_statistics,host_page_size,host_processor_info) returnkern_return_terror codes directly, unlike POSIX/C functions which return -1 and seterrno. The existing code incorrectly loggedNative.getLastError()(which readserrno) instead of the actual return value.This fixes 5 call sites across 3 files:
MacGlobalMemoryJNAhost_statisticsMacGlobalMemoryJNAhost_page_sizeMacVirtualMemoryJNAhost_statisticsMacCentralProcessorhost_statisticsMacCentralProcessorhost_processor_infoSummary by CodeRabbit