Skip to content

atomic: ll_scheduler: Fix atomic implementation, return old value - #3151

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
ktrzcinx:fix-atomic
Jul 9, 2020
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
ktrzcinx:fix-atomic

Conversation

@ktrzcinx

@ktrzcinx ktrzcinx commented Jul 8, 2020

Copy link
Copy Markdown
Member

Return value should be aligned with compiler builtins implementations,
see https://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html

Signed-off-by: Karol Trzcinski karolx.trzcinski@linux.intel.com

@lgirdwood lgirdwood left a comment

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.

Everything else looks good.

Comment thread src/arch/xtensa/include/arch/atomic.h Outdated

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.

This should return "current" i.e. the value before the sucessful increment as the "ret" value may be stale if other threads are also incrementing the same atomic value.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

updated

Return value should be aligned with compiler builtins implementations,
see https://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
@lgirdwood

Copy link
Copy Markdown
Member

Jenkins known issues.

@lgirdwood
lgirdwood merged commit b7bb801 into thesofproject:master Jul 9, 2020
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