Skip to content

Fix error introduced when merging #264. #286

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

Conversation

RichardBarry
Copy link
Contributor

Description

PR #264 changed the way prvWriteMessageToBuffer() tested to see if the stream buffer was being used as a message buffer. That update was incorrect and should not have been merged. This change reverts to the original method.

Test Steps

Run the standard stream buffer tests in FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c.

Related Issue

#264

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@RichardBarry RichardBarry requested a review from a team as a code owner March 20, 2021 19:59
@RichardBarry RichardBarry merged commit 6b72419 into FreeRTOS:main Mar 20, 2021
@RichardBarry RichardBarry deleted the fix-error-introduce-when-merging-pr264 branch March 20, 2021 19:59
volatile size_t xOriginalTail;
size_t xOriginalTail;
Copy link
Contributor

Choose a reason for hiding this comment

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

Context: #264 (comment)

if( xDataLengthBytes != xRequiredSpace )
if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) != ( uint8_t ) 0 )
Copy link
Contributor

Choose a reason for hiding this comment

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

Context: #264 (comment)

laroche pushed a commit to laroche/FreeRTOS-Kernel that referenced this pull request Apr 18, 2024
…ed buffers (FreeRTOS#286)

* Change type of usGenerateChecksum's ulAlignBits to intptr_t

Not all platforms have 32-bit pointers. 8-bit machines such as avr8 have
16-bit pointers.

This patch changes the type of ulAlignBits and renames it to uxAlignBits to
reflect the type change.

This fixes a compiler warning on machines with pointers that aren't
32-bits.

Signed-off-by: Andy Bennett <[email protected]>

* Fix usGenerateChecksum on odd-aligned buffers with non zero usSum

usGenerateChecksum would generate an incorrect checksum when pucNextData
was odd-aligned and usSum was non-zero.

This was caused by the byte order of usSum not matching the byte order of
the subsequent summing operation.

Odd-aligned buffers are common on 8-bit platforms such as avr8 when using
one of the FreeRTOS dynamic heap allocators.

Signed-off-by: Andy Bennett <[email protected]>

* Feedback from PR#122

FreeRTOS/FreeRTOS#122

 + Use a uintptr_t rather than an intptr_t.

Changes supplied by Hein Tibosch.

Signed-off-by: Andy Bennett <[email protected]>

Co-authored-by: Aniruddha Kanhere <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants