Skip to content
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

Rewrite CThunk so it does not execute from ram #8488

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Oct 20, 2018

Description

Modify the implementation of CThunk so it does not execute from ram. Instead is uses an array of functions in flash which can be allocated as a thunk. The number of CThunks that can be used by an application can be configured with MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX.

Pull request type

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

@deepikabhavnani
Copy link

@SenRamakri - Please review

platform/CThunkBase.cpp Show resolved Hide resolved
platform/CThunkBase.cpp Show resolved Hide resolved
platform/CThunkBase.cpp Show resolved Hide resolved
platform/CThunkBase.cpp Show resolved Hide resolved
platform/CThunkBase.cpp Show resolved Hide resolved
@SenRamakri
Copy link
Contributor

@c1728p9 - Overall the changes look good to me, I just dropped some questions for clarifications though.

@c1728p9 c1728p9 mentioned this pull request Nov 2, 2018
Copy link
Contributor

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just 1 style suggestion.


static void trampoline(CThunkBase *base)
{
CThunk<T> *self = (CThunk<T>*)base;
Copy link
Contributor

Choose a reason for hiding this comment

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

static_cast? Such an intricate set of code, an assurance that it's a "straightforward" cast would be welcome.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 6, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 6, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Nov 6, 2018

@mbed-ci
Copy link

mbed-ci commented Nov 6, 2018

Modify the implementation of CThunk so it does not execute from ram.
Instead is uses an array of functions in flash which can be allocated
as a thunk. The number of CThunks that can be used by an application
can be configured with MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX.
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 6, 2018

@c1728p9 what has changed in the latest rebase?

@c1728p9
Copy link
Contributor Author

c1728p9 commented Nov 6, 2018

@0xc0170 I just changed the cast to a static_cast as @kjbracey-arm suggested.

@cmonr
Copy link
Contributor

cmonr commented Nov 7, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 7, 2018

/morph test

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

@cmonr cmonr merged commit 0fe6369 into ARMmbed:master Nov 8, 2018
@cmonr cmonr removed the needs: CI label Nov 8, 2018
@0xc0170 0xc0170 deleted the cthunk_overhaul branch July 20, 2021 13:22
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