Skip to content

Fix storage rtos types - remove including internal header file #7364

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 10 commits into from
Jul 5, 2018

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Jun 28, 2018

Description

Remove internal types from our storage rtos header file. And do some refactor (some files still use internal types). Plus some other fixes as I removed one internal rtx from our include, I discovered 2 files not including needed header files!

As result, this also fix some warnings about redefinition STRINGIFY for some platforms (nordic at least).

@JonatanAntoni who I discussed the issue with

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

0xc0170 added 4 commits June 28, 2018 14:12
os_thread_t and family are internal and should not be used (thus we included
internal header file). Instead, use those that are exposed via rtx_os.h file.
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 28, 2018

Fixed few errors (I noticed those internal types are used across the code base). This PR should clean it all

pingdan32
pingdan32 previously approved these changes Jun 28, 2018
@@ -40,17 +40,17 @@ extern "C" {
implementation specific, header file, therefore limiting scope of possible changes.
*/

#include "rtx_lib.h"
#include "rtx_os.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like it.

@marcuschangarm
Copy link
Contributor

@TacoGrandeTX FYI

@0xc0170 0xc0170 force-pushed the fix_storage_rtos branch from 20b738e to 4d8baa7 Compare June 29, 2018 07:35
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 29, 2018

One more fix incoming, another internal symbol not exposed (jenkins failure). This is a good exercise !

Update: more than one. More internal symbols in our codebase. Fixing it all in once! 🔥 🚒

@0xc0170 0xc0170 mentioned this pull request Jun 29, 2018
@@ -430,6 +430,18 @@ void __rt_entry (void) {
*/
#if defined(RTX_NO_MULTITHREAD_CLIB)

// These 2 macros are taken from RTX Config (internal header)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should probably go into our config file?

Copy link
Contributor Author

@0xc0170 0xc0170 Jun 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move it there with default values set. Based on our config, there would be just one
#define OS_THREAD_LIBSPACE_NUM 4, will check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest rebase fixed it, moved to conf with default value as it was (4)

@0xc0170 0xc0170 force-pushed the fix_storage_rtos branch from 4d9d292 to fec82aa Compare June 29, 2018 10:41
0xc0170 added 3 commits June 29, 2018 11:43
RTX Config header file is internal and not exposed. With latest fixes to use
only public header files from RTX, we need to add these 2 new macros for
RTX ARMC lib configuration.
As we do not include rtx_lib header file anymore, these symbols are not available.
Use core util for if ISR is active. And for OS tick, pull in os_tick header file.
os_tick header file is C only, mangling would cause problems here
@0xc0170 0xc0170 force-pushed the fix_storage_rtos branch from fec82aa to dd33247 Compare June 29, 2018 10:43
@marcuschangarm
Copy link
Contributor

@0xc0170

Update: more than one. More internal symbols in our codebase. Fixing it all in once! 🔥 🚒

You are on a roll! 😄

Copy link

@deepikabhavnani deepikabhavnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cmonr
Copy link
Contributor

cmonr commented Jul 3, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 3, 2018

Build : FAILURE

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

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 4, 2018

uvisor example failed - @alzix shall I update the example to fix the error or?

Error:

[DEBUG] Output: ./source/led3.cpp:65:5: error: 'os_thread_t' was not declared in this scope
[DEBUG] Output:      os_thread_t thread_def = {0};

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 4, 2018

Fix for uvisor example proposed ARMmbed/mbed-os-example-uvisor-thread#104

Update: PR merged

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 4, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 4, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Jul 4, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 4, 2018

@0xc0170 0xc0170 requested a review from a team July 4, 2018 20:02
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 4, 2018

Waiting for final reviews for this bugfix. I labeled is as 5.10 due as apps could use these internal types we exposed. By 5.10, the types should be updated to the one we are providing as storage types for rtos.

@cmonr
Copy link
Contributor

cmonr commented Jul 5, 2018

+1 on targeting 5.10 due to the changes. LGTM.

@cmonr cmonr merged commit 93233c4 into ARMmbed:master Jul 5, 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