-
Notifications
You must be signed in to change notification settings - Fork 3k
TDBStore and NVStore should create an error if co exist. #9136
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
TDBStore and NVStore should create an error if co exist. #9136
Conversation
87dd9e3
to
852b69d
Compare
852b69d
to
e511c48
Compare
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
static SingletonPtr<PlatformMutex> system_storage_mutex; | ||
|
||
MBED_WEAK int set_internal_storage_ownership(internal_mem_resident_type_e in_mem_res, internal_mem_resident_type_e *out_mem_res) | ||
{ |
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.
Lets create a simpler function without parameters, with the mutex inside, named "avoid_conflict_nvstore_tdbstore"
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.
I have changed the name of the function and removed the output parameter
9882e84
to
1c8ef90
Compare
Pinging @AnotherButler to look over the |
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, pending docs review.
Whoops, nevermind. @AnotherButler no need to review this. The docs are already a part of #9135. |
1c8ef90
to
677dbd1
Compare
Technically could be ready for CI but as new commits were pushed @cmonr could you please take look to check it is still ok? |
CI started pending review of new changes |
Test run: FAILEDSummary: 3 of 7 test jobs failed Failed test jobs:
|
The CI fail because it fails to build mbed-os-example-bootloader. I have issued a PR ARMmbed/mbed-os-example-bootloader#95 to fix the example and solve the issue. |
I removed CI as this still is waiting for preceeding PR |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@0xc0170 Can this be merged? |
Release label updated based on the agreement |
@yossi2le @dannybenor Now Github itself seems to be able to resolve the fact that those 4 commits already exist. But neither |
@adbridge |
@davidsaada yes I suspect this needed to be rebased after #9135 went in. |
Description
TDBStore and NVStore usually use the same flash address for storage and therefore should not be instantiated simultaneously in the same process.
This PR adds a checkup for NVStore and TDBStore to create a runtime error in case that both of them co-exist in the same application.
This PR is dependent on #9135
Pull request type