-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Separate System::Layer and Timer into per-implementation files. #8800
Merged
woody-apple
merged 11 commits into
project-chip:master
from
kpschoedel:x7725-system-event-5
Aug 11, 2021
Merged
Separate System::Layer and Timer into per-implementation files. #8800
woody-apple
merged 11 commits into
project-chip:master
from
kpschoedel:x7725-system-event-5
Aug 11, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullapprove
bot
requested review from
chrisdecenzo,
jelderton,
jmartinez-silabs,
LuDuda,
mspang,
pan-apple,
saurabhst,
shana-apple and
woody-apple
August 4, 2021 19:55
#### Problem Various implementations of System::Layer are provided by `#if` sections, which prevents mock versions for testing and out-of-tree platform implementations. #### Change overview Split platform `#if` sections of `System::Layer` and `System::Timer` into separate `WatchableEventManager` implementations. This change does for timers what PR project-chip#6561 did for socket I/O events. The intent is that the public `WatchableEventManager` interface here will become pure virtual methods of `System::Layer`, and the various versions of `WatchableEventManager` will become its implementations. `System::Timer` remains as an `Object`-pool based utility class for implementing the Timer API. - Make `Timer` list not LwIP-specific, mutex it, and use it in preference to iterating through the entire pool. - Move `IsEarlier` from `Timer` to `Clock`. - Fix dual definitions of `Clock::Platform` functions on Linux. #### Testing Relying on CI in general, since no externally visible functionality should have changed. Sanity-checked the libevent implementation (not in CI) using chip-tool.
kpschoedel
force-pushed
the
x7725-system-event-5
branch
from
August 4, 2021 22:23
148b67d
to
786e5fd
Compare
mspang
approved these changes
Aug 6, 2021
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 seems to be some debug logs left in here.
yufengwangca
reviewed
Aug 9, 2021
yufengwangca
reviewed
Aug 9, 2021
yufengwangca
reviewed
Aug 9, 2021
src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp
Outdated
Show resolved
Hide resolved
yufengwangca
reviewed
Aug 9, 2021
yufengwangca
reviewed
Aug 9, 2021
yufengwangca
reviewed
Aug 9, 2021
woody-apple
approved these changes
Aug 9, 2021
yufengwangca
approved these changes
Aug 9, 2021
Size increase report for "esp32-example-build" from f446fd2
Full report output
|
Size increase report for "nrfconnect-example-build" from f446fd2
Full report output
|
Size increase report for "gn_qpg-example-build" from f446fd2
Full report output
|
jmartinez-silabs
approved these changes
Aug 10, 2021
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Aug 13, 2021
#### Problem As of project-chip#8800, the `System::Timer` class is no longer an inherent part of the `System::Layer` timer implementation; it is a utility class that can be used by implementations. However, project-chip#8800 did not include any example of this kind of use, and did not adequately document `System::Timer`. #### Change overview - The libevent implementation no longer uses `System::Timer`. - Added documentation for `System::Timer`. - Moved documentation for `System::Layer` into the header. #### Testing Manual verification using chip-tool. The libevent implementation is currently provided only as an illustrative example, and is not exercised in CI.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Aug 13, 2021
#### Problem As of project-chip#8800, the `System::Timer` class is no longer an inherent part of the `System::Layer` timer implementation; it is a utility class that can be used by implementations. However, project-chip#8800 did not include any example of this kind of use, and did not adequately document `System::Timer`. #### Change overview - The libevent implementation no longer uses `System::Timer`. - Added documentation for `System::Timer`. - Moved documentation for `System::Layer` into the header. #### Testing Manual verification using chip-tool. The libevent implementation is currently provided only as an illustrative example, and is not exercised in CI.
nikita-s-wrk
pushed a commit
to nikita-s-wrk/connectedhomeip
that referenced
this pull request
Sep 23, 2021
…ect-chip#8800) * Separate System::Layer and Timer into per-implementation files. #### Problem Various implementations of System::Layer are provided by `#if` sections, which prevents mock versions for testing and out-of-tree platform implementations. #### Change overview Split platform `#if` sections of `System::Layer` and `System::Timer` into separate `WatchableEventManager` implementations. This change does for timers what PR project-chip#6561 did for socket I/O events. The intent is that the public `WatchableEventManager` interface here will become pure virtual methods of `System::Layer`, and the various versions of `WatchableEventManager` will become its implementations. `System::Timer` remains as an `Object`-pool based utility class for implementing the Timer API. - Make `Timer` list not LwIP-specific, mutex it, and use it in preference to iterating through the entire pool. - Move `IsEarlier` from `Timer` to `Clock`. - Fix dual definitions of `Clock::Platform` functions on Linux. #### Testing Relying on CI in general, since no externally visible functionality should have changed. Sanity-checked the libevent implementation (not in CI) using chip-tool. * rebase and regen zap * Remove obsolete TODO. * restyle * remove leftover debug logging * restyle * convert outdated ChipError::FormatError() * review - add config flag CHIP_SYSTEM_CONFIG_USE_TIMER_POOL - use std::lock_guard rather than inventing ScopedMutexLock - rename mWatchableEvents and WatchableEvents()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Various implementations of System::Layer are provided by
#if
sections,which prevents mock versions for testing and out-of-tree platform
implementations.
Change overview
Split platform
#if
sections ofSystem::Layer
andSystem::Timer
into separate
WatchableEventManager
implementations.This change does for timers what PR #6561 did for socket I/O events.
The intent is that the public
WatchableEventManager
interface herewill become pure virtual methods of
System::Layer
, and the variousversions of
WatchableEventManager
will become its implementations.System::Timer
remains as anObject
-pool based utility class forimplementing the Timer API.
Part of issue #5556 rework system layer event loop
Part of issue #7715 Virtualize System and Inet interfaces
Fixes #7757 Integrate timer platform details with WatchableEventManager.
Testing
Relying on CI in general, since no externally visible functionality
should have changed. Sanity-checked the libevent implementation (not in
CI) using chip-tool.