PTHREAD_PRIO_INHERIT 的翻译

当码农一定要学好英语,今天上班用pthread库,设置mutex attribute的时候遇到下面一段话

When a thread is blocking higher priority threads because of owning one or more mutexes with the PTHREAD_PRIO_INHERIT protocol attribute, it shall execute at the higher of its priority or the priority of the highest priority thread waiting on any of the mutexes owned by this thread and initialized with this protocol.

简书上有这么一段翻译

PTHREAD_PRIO_INHERIT: 当拥有一个或多个这种协议属性的互斥锁的线程阻塞更高优先级的线程时,那么该线程将以高于自身或者被该线程所拥有的互斥锁所阻塞线程中最高优先级的线程优先级的运行。

说实话我没看懂其中的后一句

猜测如下, 括号里的为一个意群,下划线部分作为独立主格结构修饰 the priority of

it shall execute at (the higher of its priority or) the priority of the highest priority thread waiting on any of the mutexes owned by this thread and initialized with this protocol.

我粗略翻译为:

该线程应该以更高的优先级执行,鉴于本线程拥有高优先级的互斥锁,应使更高优先级的线程等待本线程执行。

当然不一定对

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值