Skip to content

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

Merged
merged 1 commit into from
Oct 15, 2018

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Sep 4, 2018

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

[ ] Fix
[x] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

This isn't a bug fix, just avoids the build warnings, so probably not for a patch release. Could be rc2 perhaps.

@@ -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);
Copy link
Contributor Author

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.

@bmcdonnell-ionx
Copy link
Contributor

bmcdonnell-ionx commented Sep 14, 2018

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.

@kjbracey
Copy link
Contributor Author

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.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 24, 2018

@ARMmbed/mbed-os-core Needs your review now

@cmonr
Copy link
Contributor

cmonr commented Sep 29, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Sep 29, 2018

Build : FAILURE

Build number : 3194
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7980/

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 1, 2018

The failures related to the changes, please review

@kjbracey
Copy link
Contributor Author

kjbracey commented Oct 9, 2018

Rebased - couple more conversions needed in features/cellular/TESTS/api/cellular_network and TEST_APPS/device/nanostack_mac_tester

@cmonr
Copy link
Contributor

cmonr commented Oct 9, 2018

@kjbracey-arm It looks like this still needs to pass unittests before it can go thorugh CI.

@kjbracey kjbracey force-pushed the thread_deprecations branch from 8ea963e to dac948c Compare October 12, 2018 11:03
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.
@kjbracey kjbracey force-pushed the thread_deprecations branch from dac948c to 1ef213e Compare October 12, 2018 11:57
@kjbracey
Copy link
Contributor Author

Unit tests fixed

@NirSonnenschein
Copy link
Contributor

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 14, 2018

Build : SUCCESS

Build number : 3347
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7980/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Oct 14, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 14, 2018

@cmonr cmonr merged commit ec03df4 into ARMmbed:master Oct 15, 2018
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.

7 participants