Data Race Atomic Operations
조회 수: 4 (최근 30일)
표시 이전 댓글
Hello,
I want to understand if data race condition is a bug in atomic operations.
Because: When using atomic operations, if "Data Race including atomic operations" is selected under Concurrency in the Bug Finder Analysis section, 'Data race ' error comes and Critical Protection is recommended to prevent it. should i follow it ?
Polyspace uses the Pointer size for your Target processor type as the threshold to compute atomicity.
If 'Data Race including atomic operations' is selected, analysis shows the error on var else it does not show. Ist it important the select this defect ?
int var;
void begin_critical_section(void);
void end_critical_section(void);
void increment(void) {
var++;
}
void task1(void) {
increment();
}
void task2(void) {
increment();
}
void task3(void) {
begin_critical_section();
increment();
end_critical_section();
}
you can see the example from the link
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Bug Finder Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!