eclipse-iceoryx / eclipse-iceoryx/iceoryx
A Small Mistake in lockfree_queue.md
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
There is a minor typo in the Pop Operation section of the iceoryx/doc/design/lockfree_queue.md document, where the state of the queue after a pop operation is incorrectly illustrated. Specifically, the positions of x and y are swapped.
## Current Document:
### Pop Operation
Pop reads the value at the index of head and returns it if the cycle matches Heads cycle and a CAS to increase head by 1 succeeds.
```
[ (c,?), (c,y), (c,x), (c-1,?) ] H=(c,1) T=(c,3)
```
pop returns y
```
[ (c,?), (c,x), (c,y), (c-1,?) ] H=(c,2) T=(c,3)
```
## Corrected Document:
Pop reads the value at the index of head and returns it if the cycle matches Heads cycle and a CAS to increase head by 1 succeeds.
```
[ (c,?), (c,x), (c,y), (c-1,?) ] H=(c,1) T=(c,3)
```
pop returns y
```
[ (c,?), (c,x), (c,y), (c-1,?) ] H=(c,2) T=(c,3)
```
Thank you.
Contributor guide
Research direction
Open iceoryx/doc/design/lockfree_queue.md and go to the Pop Operation section. Compare the two queue-state diagrams with the described pop result, correct the swapped positions of x and y in the first diagram, and confirm both diagrams consistently show pop returning y.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100