Skip to content

sys: add threadsafe ringbuffer#3923

Merged
kaspar030 merged 2 commits intoRIOT-OS:masterfrom
kaspar030:add_threadsafe_ringbuffer
Sep 25, 2015
Merged

sys: add threadsafe ringbuffer#3923
kaspar030 merged 2 commits intoRIOT-OS:masterfrom
kaspar030:add_threadsafe_ringbuffer

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

In case there's only one producer and one receiver thread (or ISR), this ringbuffer impementation can be used concurrently without extra locking.

The implementation is a lot simpler than "ringbuffer", e.g., it is not possible to overwrite bytes.

@kaspar030 kaspar030 added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Sep 22, 2015
@haukepetersen
Copy link
Copy Markdown
Contributor

nice one, will test after we got the release out...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@defgroup    sys_tsrb Thread safe ringbuffer
@ingroup     sys
@brief           Bla BLA BLA

...

@kaspar030
Copy link
Copy Markdown
Contributor Author

(this will need a little hackery to be thread-safe on atmega)

@kaspar030 kaspar030 force-pushed the add_threadsafe_ringbuffer branch from a89f4e4 to ee930d6 Compare September 24, 2015 16:04
@OlegHahm OlegHahm added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 24, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove blank line

@OlegHahm OlegHahm added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Sep 24, 2015
@OlegHahm
Copy link
Copy Markdown
Member

Apart from my fundamental critics in the comments, I'd like to merge this for the release... Please squash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/pwer/power/

@Kijewski
Copy link
Copy Markdown
Contributor

Untested, but the logic looks sane to me.

@kaspar030 kaspar030 force-pushed the add_threadsafe_ringbuffer branch 2 times, most recently from a1a41df to 39bd4b1 Compare September 24, 2015 19:53
@kaspar030 kaspar030 removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Sep 24, 2015
@kaspar030
Copy link
Copy Markdown
Contributor Author

  • addressed comments
  • squashed

@kaspar030 kaspar030 force-pushed the add_threadsafe_ringbuffer branch from 39bd4b1 to aa321eb Compare September 25, 2015 07:09
@kaspar030
Copy link
Copy Markdown
Contributor Author

  • fixed and squashed another doxygen fix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could you also write this requirement somewhere into the doxygen block, so that it appears in the doc? Maybe using a @pre or @note command?

@kaspar030
Copy link
Copy Markdown
Contributor Author

double green!

@OlegHahm
Copy link
Copy Markdown
Member

Do I get the "free beer" if I ACK and hit the button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants