Skip to content

Remove Mutex deprecated API #12596

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

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Conversation

rajkan01
Copy link
Contributor

@rajkan01 rajkan01 commented Mar 6, 2020

Summary of changes

Removed Mutex deprecated API.

Impact of changes

Breaking change: Mutex lock(uint32_t millisec) method have been deprecated since Mbed OS 5.10 and its removed now.

Migration actions required

Use Mutex lock, trylock, trylock_for methods.

Documentation

None


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[x] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@evedon


@ciarmcom ciarmcom requested review from evedon and a team March 6, 2020 18:00
@ciarmcom
Copy link
Member

ciarmcom commented Mar 6, 2020

@rajkan01, thank you for your changes.
@evedon @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2020

CI started

@kjbracey
Copy link
Contributor

kjbracey commented Mar 9, 2020

As a follow-up, could you also remove the return value from lock, which was planned for deprecation? (And is already RTOS builds only).

@mbed-ci
Copy link

mbed-ci commented Mar 9, 2020

Test run: SUCCESS

Summary: 7 of 7 test jobs passed
Build number : 1
Build artifacts

@evedon
Copy link
Contributor

evedon commented Mar 9, 2020

As a follow-up, could you also remove the return value from lock, which was planned for deprecation? (And is already RTOS builds only).

Let's mark the function with the return value as deprecated for the upcoming release this week and we will remove the deprecated function next month.
cc @rajkan01

@kjbracey
Copy link
Contributor

kjbracey commented Mar 9, 2020

Let's mark the function with the return value as deprecated

It's been as deprecated as it can be since 5.9 or so (just documentation). You can't actually generate a deprecation warning, as we're not removing the function, just eliminating its return value. :(

There are compiler attributes like [[nodiscard]] to generate warnings if you don't use a return value, but I'm not aware of the opposite - warn if you use it.

@evedon
Copy link
Contributor

evedon commented Mar 9, 2020

Let's mark the function with the return value as deprecated

It's been as deprecated as it can be since 5.9 or so (just documentation). You can't actually generate a deprecation warning, as we're not removing the function, just eliminating its return value. :(

There are compiler attributes like [[nodiscard]] to generate warnings if you don't use a return value, but I'm not aware of the opposite - warn if you use it.

Okay. So let's remove the return value as you suggest in a different PR.

@rajkan01
Copy link
Contributor Author

rajkan01 commented Mar 9, 2020

Let's mark the function with the return value as deprecated

It's been as deprecated as it can be since 5.9 or so (just documentation). You can't actually generate a deprecation warning, as we're not removing the function, just eliminating its return value. :(
There are compiler attributes like [[nodiscard]] to generate warnings if you don't use a return value, but I'm not aware of the opposite - warn if you use it.

Okay. So let's remove the return value as you suggest in a different PR.

@kjbracey-arm Do we need to remove the return value from unlock?

@kjbracey
Copy link
Contributor

kjbracey commented Mar 9, 2020

Yes, unlock too. I forgot it was the pair.

@0xc0170 0xc0170 merged commit 749ce58 into ARMmbed:master Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants