标签:body table 自旋锁 ali order 需要 tab style 上下
中断上下文只能使用自旋锁。任务睡眠时只能使用互斥体。
需求 | 建议的加锁方法 |
低开销加锁 | 优先使用自旋锁 |
短期锁定 | 优先使用自旋锁 |
长期加锁 | 优先使用互斥体 |
中断上下文加锁 | 使用自旋锁 |
持有锁需要睡眠 | 使用互斥体 |
何时使用自旋锁?何时使用互斥体?
标签:body table 自旋锁 ali order 需要 tab style 上下
原文地址:https://www.cnblogs.com/zongfanstudy/p/13898151.html
暂无评论...