]> begriffs open source - freertos/commit
Fix race condition bugs when reading and writing to message buffers (#264)
authormilesfrain <milesfrain@users.noreply.github.com>
Sat, 20 Mar 2021 19:03:27 +0000 (12:03 -0700)
committerGitHub <noreply@github.com>
Sat, 20 Mar 2021 19:03:27 +0000 (12:03 -0700)
commit6685c042cb3b3811e2965d3dce59c42e4566648f
treebbab8bc00071c6a30dc42abe198ee15c1a620500
parent086d52f9d31677986c9df7721b488fdff86ade69
Fix race condition bugs when reading and writing to message buffers (#264)

* Fix inaccuracies in prvWriteBytesToBuffer description

* Perform atomic message write in prvWriteMessageToBuffer

* Remove unnecessary length arg from prvReadMessageFromBuffer

* Perform atomic message read in prvReadBytesFromBuffer

* Apply SpacesAvailable() fix

Original author: RichardBarry

* Apply review feedback

* Edit some prv functions for simplicity and consistency

- prvWriteMessageToBuffer
- prvReadMessageFromBuffer
- prvWriteBytesToBuffer
- prvReadBytesFromBuffer

* Significant simplification of prvWriteMessageToBuffer

* fixup off-by-one comment indentation

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
stream_buffer.c