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>
This commit is contained in:
milesfrain 2021-03-20 12:03:27 -07:00 committed by GitHub
parent 086d52f9d3
commit 6685c042cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff