Commit 7380241
lib: os: mpsc_pbuf: take spinlock in utilization getters
Two public functions do not take the spinlock even though
they access mutable, non-atomic members of the buffer:
- mpsc_pbuf_get_utilization()
- mpsc_pbuf_get_max_utilization()
Take the spinlock to avoid possible data races.
Signed-off-by: Damian Krolik <[email protected]>1 parent ece3f3b commit 7380241
1 file changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
630 | 632 | | |
631 | 633 | | |
632 | 634 | | |
| 635 | + | |
| 636 | + | |
633 | 637 | | |
634 | 638 | | |
635 | 639 | | |
636 | 640 | | |
| 641 | + | |
| 642 | + | |
637 | 643 | | |
638 | | - | |
639 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
640 | 649 | | |
641 | 650 | | |
642 | | - | |
643 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
644 | 654 | | |
0 commit comments