-
Notifications
You must be signed in to change notification settings - Fork 3k
Clean up rtos::Thread deprecation warnings #7980
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
Conversation
@@ -391,7 +391,7 @@ static void test_case_multithread_malloc_free() | |||
threads[i].start(callback(malloc_free, &threads_continue)); | |||
} | |||
|
|||
Thread::wait(wait_time_us); | |||
ThisThread::sleep_for(wait_time_us); |
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 note in passing that this takes milliseconds not microseconds. I wonder if this is supposed to run for 10 seconds or 10 milliseconds? Not changing it in this PR, anyway.
I added the additional substitutions I found in #8127 to a branch in my fork, https://github.com/bmcdonnell-ionx/mbed-os/tree/thread_deprecations. @kjbracey-arm, have a look and see if you want to pull any of my (3) commits there into this. |
Thanks! For the tests, the return values of the signal functions are different, so your transformation doesn't work directly - would fail to compile. I transformed some of the tests to test the new API, but decided it was simplest to leave that signal one testing the original. Maybe revisit and transform later. Will incorporate the other 2 patches. |
bdd66e3
to
c3b869b
Compare
@ARMmbed/mbed-os-core Needs your review now |
/morph build |
Build : FAILUREBuild number : 3194 |
The failures related to the changes, please review |
c3b869b
to
ccafa00
Compare
ccafa00
to
8ea963e
Compare
Rebased - couple more conversions needed in features/cellular/TESTS/api/cellular_network and TEST_APPS/device/nanostack_mac_tester |
@kjbracey-arm It looks like this still needs to pass unittests before it can go thorugh CI. |
8ea963e
to
dac948c
Compare
Static Thread methods and signal methods have been deprecated. Remove all references in the main code, and most of the tests. Some tests of the deprecated APIs themselves remain.
dac948c
to
1ef213e
Compare
Unit tests fixed |
/morph build |
Build : SUCCESSBuild number : 3347 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2980 |
Test : SUCCESSBuild number : 3152 |
Description
Static rtos::Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
Pull request type
This isn't a bug fix, just avoids the build warnings, so probably not for a patch release. Could be rc2 perhaps.