Skip to content

equeue: avoid non-standard bit shifts #11782

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

Merged
merged 3 commits into from
Nov 6, 2019
Merged

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Oct 31, 2019

Description (required)

Shifting negative numbers right is implementation-defined, and shifting positive signed numbers left and exceeding positive range is undefined.

Take care to make sure we always shift unsigned values.

Attempt to fix #11778


Pull request type (required)

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results (required)

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Shifting negative numbers right is implementation-defined, and shifting
positive signed numbers left and exceeding positive range is undefined.

Take care to make sure we always shift unsigned values.
@ciarmcom
Copy link
Member

@kjbracey-arm, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from a team October 31, 2019 12:00
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 5, 2019

@ARMmbed/mbed-os-core Please review, I'll run CI meanwhile

@mbed-ci
Copy link

mbed-ci commented Nov 5, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

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

Successfully merging this pull request may close these issues.

EventQueue: impossible to cancel event with negative unique id
4 participants