admin管理员组文章数量:1431464
I'm encountering an issue with 3 tasks running on SimulIDE. 2 of them share the same resource. A has priority higher than C (they 2 share the resource), but as soon as C requests the resource, it somehoiw gets preempted by task A while in its critical section.
I'm using a timer:
void do_things(int ms=1){
unsigned long mul = ms * 504UL;
unsigned long i;
for(i=0; i<mul; i++) {
millis();
};
to simulate busy cycles.
I tried changing tick times and changing the order of functions in the code but here's the result:
[taskC_1]
C start: 2799-->
start_do_things_100
end_do_things_100
C:Resource Requested at: 2900
start_do_things_200
end_do_things_200
[taskA_3]
A start: 3102-->
A:Resource Requested at: 3102
A:Resource Released at: 3303
A end:--> 3304
[taskB_2]
B start: 3304-->
[taskA_4]
A start: 3997-->
A:Resource Requested at: 3997
A:Resource Released at: 4198
A end:--> 4199
B end:--> 4208
C:Resource Released at: 4208
C end:--> 4209
as you see, A starts after C has taken the resource
本文标签: cOSEKshared resource and priority inversionStack Overflow
版权声明:本文标题:c - OSEK, shared resource and priority inversion - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745556351a2663209.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论