Skip to content

Migrate from protothreads 1.4 to protothreads 2.0 #2726

@jklarenbeek

Description

@jklarenbeek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions