Skip to content

Eventloop in main thread #5752

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

Conversation

TeroJaasko
Copy link
Contributor

This has the same content as https://github.com/ARMmbed/mbed-os-confidential-m/pull/7, just the target repo and branch are different.

@0xc0170 0xc0170 requested a review from SeppoTakalo December 21, 2017 13:06
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 21, 2017

Can you please rebase your patch, I rebased the destination branch to get travis fix that is required here

The separate eventloop thread may not be necessary on all uses, as one
can use the existing main thread for event dispatching. Add a
conditional nanostack-hal.event-loop-dispatch-from-application, which
disables the thread creation.

Note: the ns_hal_init must be ran from the same thread which will be
used to execute the event loop later.
…read

The thread flag signaling mechanism is problematic if a separate event
loop thread is not used. The problem is, that one needs to know the
thread id of the loop dispathcer, and that knowledge can be derived
only from the caller thread of the initialization function.

Remove the magic connection from caller thread to dispatcher thread
by using event flags instead of thread flags on signaling. As the
event flags require the massive amount 20 bytes of RAM whereas
thread flags requires none, keep the code behind flag.
@TeroJaasko TeroJaasko force-pushed the eventloop_in_main_thread branch from f74780f to 9054ef5 Compare December 21, 2017 15:14
@TeroJaasko
Copy link
Contributor Author

Rebased with current feature-miniclient -branch and force pushed.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 21, 2017

/morph build

@mbed-ci
Copy link

mbed-ci commented Dec 21, 2017

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Dec 21, 2017

@mbed-ci
Copy link

mbed-ci commented Dec 22, 2017

@adbridge
Copy link
Contributor

@cmonr This didn't need a release version as it is going into a feature branch not master .

@adbridge adbridge merged commit f769c3e into ARMmbed:feature-miniclient Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants