• 只能任务持有互斥并且只有这个任务可以互斥锁

    Only one task may hold the mutex at a time, and only this task can unlock the mutex.

    youdao

  • 将创建一个新的互斥锁初始化结构

    This creates a new mutex and initializes the structure.

    youdao

  • 类型互斥锁可提供错误检查

    This type of mutex provides error checking.

    youdao

  • 一个互斥锁定后必须

    After a mutex is locked, it must be unlocked.

    youdao

  • 内核可以使用互斥锁实现信号量行为

    Mutexes are available in the kernel as a way to accomplish semaphore behavior.

    youdao

  • 操作设置涉及分配预先互斥锁

    The setup for a lock operation involves allocation of a prelocked mutex.

    youdao

  • 可能因为分配时间片结束持有互斥锁线程取消调度。

    A thread holding a mutex can be de-scheduled, perhaps because it was the end of its time-slice.

    youdao

  • 因此最后两个线程等待条件变量互斥锁没有住。

    Therefore, at the end of it all, you now have two reader threads, both waiting on the condition variable, and the mutex is unlocked.

    youdao

  • 队列构造函数析构函数负责创建销毁互斥锁清单1

    The constructor and destructor of the queue class are responsible for the creation and destruction of the mutex, as shown in Listing 1.

    youdao

  • 如果可用,则获取执行互斥动作然后释放

    When the lock is available, it is taken, the mutually-exclusive action is performed, and then the lock is released.

    youdao

  • 尝试解除其他线程互斥锁会产生不确定的行为

    Attempting to unlock a mutex locked by a different thread results in undefined behavior.

    youdao

  • 如果在读线程能够获得互斥之前发生了超时,那么需要进行处理

    If the timeout has occurred before the reader thread could acquire the mutex, then no processing need be done.

    youdao

  • 这个互斥锁状态立即去掉标记,其他等待线程被阻止

    The state of the mutex is immediately reset to not signaled so any other waiting threads remain blocked.

    youdao

  • 非争用操作一个互斥锁返回线程缓存

    Uncontested unlock operations return a locked mutex to the thread lock cache.

    youdao

  • 内核互斥锁原子api之上实现对于内核用户可见的。

    The kernel mutex is implemented on top of the atomic API, though this is not visible to the kernel user.

    youdao

  • 对于等待同一互斥锁其他线程不利影响因为等待时间现在更长

    For other threads waiting on the same mutex, this has a negative effect, because the wait time is now even longer.

    youdao

  • 如果超时时间段结束时还没有唤醒读线程需要唤醒自身释放互斥

    If not awake otherwise, at the end of the timeout, the reader needs to wake itself up and release the mutex.

    youdao

  • 可以通过DEFINE _ mutex使用一个操作创建初始化互斥

    You create and initialize a mutex in one operation through the DEFINE_MUTEX macro.

    youdao

  • 更好做法定义另一个方法它接收一系列整数获取释放互斥一次

    A far better approach would be to define another method that accepts a list of integers and acquire and release the mutex only once.

    youdao

  • 这个调用互斥可用返回否则互斥锁可用之前休眠

    This call returns if the mutex is available; otherwise, it sleeps until the mutex is available.

    youdao

  • 这个中间件请求开始之前加一个互斥,在请求结束之后解开这个

    The middleware locks a mutex at the beginning of the request, and unlocks the mutex when the request finishes.

    youdao

  • 多个控制线程可以同时在队列添加数据删除数据,所以需要互斥锁对象管理同步

    Multiple threads of control can simultaneously try to push data to the queue or remove data, so you need a mutex object to manage the synchronization.

    youdao

  • 现在剩下次要任务 ——初始互斥锁启动线程运行可上传的文件列表

    This just leaves us with a couple of minor bookkeeping tasks -- initializing the mutex and starting a thread to run through the list of uploadable files.

    youdao

  • 存放数据时候先要获得互斥,再往总线数据,最后再释放互斥锁

    When publishing its data, it would acquire a mutex, do writes to the bus, and release the mutex.

    youdao

  • 这么会唤醒所有等待条件变量_ cond线程;读线程现在隐式地争夺互斥

    Doing so awakens all the reader threads that were waiting on the condition variable _cond; the reader threads now implicitly compete for the mutex lock as and when it is released.

    youdao

  • 显然数据放到队列像是把数据添加列表中必须使用互斥保护这个操作

    Clearly, pushing data into the queue is akin to appending data to the list, and this operation must be guarded by mutex locks.

    youdao

  • 两个级别上执行(清单7):读写各个节点包含一个互斥锁

    Locking occurs on two levels (see Listing 7) : The list has a read-write lock, while individual nodes contain a mutex.

    youdao

  • 操作系统调度程序决定哪个线程获得互斥控制权—通常,等待时间最长线程先读取数据

    The operating system scheduler determines which thread gets control of the mutex next-typically, the reader thread that has waited the longest gets to read the data first.

    youdao

  • 这个线程完成了,必须改变互斥锁为标记状态以便其他进程可以访问这些资源

    When the thread is finished with the resource, it must set the state of the mutex to signaled to allow other threads to access the resource.

    youdao

  • 互斥api提供了5个函数其中3个用于用于个用于测试互斥锁

    The mutex API provides five functions: three are used for locking, one for unlocking, and another for testing a mutex.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定