-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Darwin][Network.framework] Add src/platform/Darwin/system/SystemLaye… #38912
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
base: master
Are you sure you want to change the base?
[Darwin][Network.framework] Add src/platform/Darwin/system/SystemLaye… #38912
Conversation
PR #38912: Size comparison from f4d171a to 1f7fd6a Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
1f7fd6a
to
d0d7a6a
Compare
PR #38912: Size comparison from 53ed908 to d0d7a6a Full report (46 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, linux, nrfconnect, psoc6, qpg, stm32, telink, tizen)
|
d0d7a6a
to
253f5df
Compare
PR #38912: Size comparison from d6b2cee to 253f5df Full report (11 builds for cc13x4_26x4, cc32xx, qpg, stm32, tizen)
|
253f5df
to
712341a
Compare
PR #38912: Size comparison from d6b2cee to 712341a Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
712341a
to
996971d
Compare
PR #38912: Size comparison from 162df09 to 996971d Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
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.
Pull Request Overview
This PR introduces a new dispatch‐based system layer implementation for Darwin platforms, replacing the legacy socket-based event handling where appropriate. Key changes include:
- Adding new files (SystemLayerImplDispatch.h/mm and SystemLayerImplDispatchSockets.mm) for dispatch-based execution.
- Updating macros, tests, and build configurations to correctly route to the new dispatch implementation.
- Removing dispatch-specific code from the legacy select-based implementation to improve code clarity and maintainability.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/system/tests/TestSystemWakeEvent.cpp | Updated macro conditions to ensure dispatch-based tests are excluded from socket paths. |
src/system/tests/TestSystemTimer.cpp | Revised template specialization and macro usage for dispatch-based timer events. |
src/system/system.gni | Updated event loop selection logic to favor "Dispatch" when appropriate. |
src/system/SystemTimer.h | Updated friend class from LayerImplSelect to LayerImplDispatch for dispatch timers. |
src/system/SystemLayerImplSelect.{h,cpp} | Removed dispatch-related sections to clean up legacy select-based implementation. |
src/system/SystemLayer.h | Adjusted conditional includes and class declarations for dispatch vs. socket usage. |
src/platform/Darwin/system/SystemLayerImplDispatch{Sockets.mm, .mm, .h} | New dispatch-based implementation for network event handling and timer management. |
src/platform/Darwin/PlatformManagerImpl.cpp | Adjusted casting to use LayerDispatch in line with the new dispatch implementation. |
src/platform/Darwin/BUILD.gn | Updated build configuration to include new dispatch files and handle conditional sources. |
src/inet/tests/TestInetCommonPosix.cpp | Modified test macros to reflect proper dispatch vs. socket behavior in event handling. |
.github/workflows/lint.yml | Added new lint known-failure exclusion for SystemLayerImplDispatch.h. |
996971d
to
49e6546
Compare
49e6546
to
7adb232
Compare
PR #38912: Size comparison from 9189b28 to 7adb232 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…rImplDispatch.mm such that the unit tests runs using the dispatch mechanism instead of the socket based implementation
7adb232
to
7c01f51
Compare
PR #38912: Size comparison from d3df54e to 7c01f51 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…rImplDispatch.mm such that the unit tests runs using the dispatch mechanism instead of the socket based implementation
Description
This change introduces a new
System::LayerImplDispatch
implementation for Darwin platforms.It separates dispatch-based event handling from the socket-based
LayerImplSelect
, allowing better compatibility and readability when usingNetwork.framework
, which does not rely on POSIX sockets or select().Why
LayerImplSocket
a poor fit.Changes
SystemLayerImplDispatch.h/mm
andSystemLayerImplDispatchSockets.mm
CHIP_SYSTEM_CONFIG_USE_DISPATCH
is setSystemLayerImplSelect
by removing dispatch-specific logic that no longer belongs thereTesting