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

Migrate from protothreads 1.4 to protothreads 2.0 #2726

Open
jklarenbeek opened this issue Sep 11, 2024 · 0 comments
Open

Migrate from protothreads 1.4 to protothreads 2.0 #2726

jklarenbeek opened this issue Sep 11, 2024 · 0 comments

Comments

@jklarenbeek
Copy link

jklarenbeek commented Sep 11, 2024

Hi,

I've updated the protothreads 1.4 library that is currently used in contiki-os to protothreads library 2.0.

I have looked into the code of contiki-os and see no direct problems using this for contiki-os but leverages a view possible advantages:

  1. more control flow constructs like try catch finally, without the overhead.
  2. better handling of yielding functions.
  3. error handling by state with additional overhead.

I haven't been able to spot any problems for contiki-os using protothreads v2 as long it uses the lc-switch.h duff-device construct and NOT the lc-addrlabels.h construct. This is btw, prone to errors on the long run anyway.

You can find the protothreads v2 library as a module in the protoduino framework at:
https://github.com/jklarenbeek/protoduino

I was wondering what you would think about this change.

Regards,

Joham

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

No branches or pull requests

1 participant