Pthread

Pthread

常用释义

词性释义

Pthread
例句
  • 全部
我在PPE上进一步测试了这个简单的Pthread代码,以此了解随着线程数量的增加它的性能变化情况。
As you can see, pthread_mutex_init accepts a pointer to an already-allocated region of memory to initialize as a mutex.
正如所示,pthread_mutex_init接受一个指针作为参数以初始化为互斥对象,该指针指向一块已分配好的内存区。
换言之,系统为每个pthread分配至少10MB的专用存储。
这听起来有点难以理解,下面的pthread例子会说明条件变量是怎么工作的。
这样,PTHREAD_PROCESS_SHARED和进程间POSIX同步原语可以被实现,而且现在可用。
pthread -qthreaded or _r invocation mode Creates programs running in a multithreaded environment.
pthread-qthreaded或_r调用模式创建在多线程环境中运行的程序
In Linux, pthread_cond_signal wakes up a thread waiting on a conditional variable.
在Linux中,pthread_cond_signal会唤醒等待某个条件变更的某个线程。
Futex (fast user space mutex) is done by the kernel on the thread ID upon pthread_join (for more on futex, please see Resources).
当pthread_join发生时由内核根据线程ID来完成Futex(fastuserspacemutex)。(要了解futex的更多信息,请参阅参考资料)。
POSIX通过pthread_mutex数据类型提供锁定和同步支持。
In Linux, the pthread_cancel method terminates execution of the thread identified by the specified threadId.
在Linux中,pthread_cancel可以终止由具体的threadId所标识的线程的执行。
Note that you've invoked pthread_cond_broadcast after releasing the mutex.
注意,在释放互斥锁之后调用pthread_cond_broadcast。
If the list were originally empty, you call pthread_cond_broadcast to post push data into the list.
如果列表原来是空的,就调用pthread_cond_broadcast以宣告列表中已经添加了数据。
在libspe2中,这个操作变成同步的了,因此您可能会希望在后台运行一个线程,并发出自己的pthread调用。
A POSIX API for creating a pthread_mutex lets the mutex implement the priority-inheritance protocol.
用于创建pthread_mutex的POSIXAPI使用互斥锁来实现优先级继承协议。
If you need to block the calling thread for a specific time, then use the pthread_cond_timewait to block the thread.
如果您需要在指定的一段时间内阻塞发出调用的线程,那么请使用pthread_cond_timewait来阻塞它。
pthread_mutexes can be created with different locking policies.
pthread_mutex可以使用不同的锁定策略创建。
pthread_rwlock_rdlock may fail if the maximum number of read locks (implementation defined) for the lock has been exceeded.
如果超过了最大读锁数量(由实现定义),pthread_rwlock_rdlock可能会失败。
这种仔细的Pthread调度方法使测试运行的结果更加准确,可重复性更高。
前面的表1给出了用于线程间同步的pthread条件变量。
You can further optimize this situation by using pthread_mutex_timedlock API, if your system supports it (see Resources).
如果系统支持的话,可以使用pthread_mutex_timedlockAPI进一步优化这个场景(见参考资料)。
这个接口并不是提供一个逻辑SPU的抽象,而是面向线程的,它的工作方式与pthread库类似。
The linker complained of some missing pthreads-related exports.
链接器抱怨缺少与pthread相关的输出。
Otherwise, it can be created statically when it is declared by a pthread_mutex_t variable.
或者,当通过pthread_mutex_t变量声明它的时候,可以静态地创建它。
Meanwhile, you can use pthread_xxxx calls at any time after the thread has been created.
同时,您在创建线程之后的任意时候都可以使用pthread_xxxx。
Linux pthread mutexes are supported by fast user-space mutexes, known as futexes.
快速用户空间互斥(也被称为futexes)支持Linuxpthread互斥锁。
Immediately after unlocking the mutex, thread 2 calls the function pthread_cond_broadcast(&mycond).
在对互斥对象解锁之后,2号线程会立即调用函数pthread_cond_broadcast(&mycond)。
With this background, let's look at the function pthread_cond_timedwait, which you use for the second check.
有了这些背景知识,我们来看看pthread_cond_timedwait函数,这个函数用于进行第二个检查。
While still holding the mutex lock, our thread will call pthread_cond_wait(&mycond, &mymutex).
锁定互斥对象时,线程将调用pthread_cond_wait(&mycond,&mymutex)。
Take care to invoke pthread_rwlock_unlock n times if there are n concurrent read locks for the lock.
如果有n个并发的读锁,一定要调用pthread_rwlock_unlockn次。
The POSIX lock type is a pthread_mutex.
POSIX锁的类型为pthread_mutex。