Identifying architecture-specific changes such as mutex locking.
确定特定体系结构的变化,比如互斥锁定(mutex locking)。
Locking occurs on two levels (see Listing 7) : The list has a read-write lock, while individual nodes contain a mutex.
在两个级别上执行锁定(见清单7):链表有一个读写锁,各个节点包含一个互斥锁。
Once you have it, no one can take it away from you until you put it down. The process of picking up the unique object is called locking, or acquiring, the mutex.
占有这个惟一物体的过程就叫做锁定或者获得互斥量。
The mutex API provides five functions: three are used for locking, one for unlocking, and another for testing a mutex.
互斥锁api提供了5个函数:其中3个用于锁定,一个用于解锁,另一个用于测试互斥锁。
To help minimize mutex allocation and locking time, the JVM manages a global lock cache and a per-thread lock cache where each cache contains unallocated pthread_mutexes.
为了帮助实现互斥锁分配和锁定时间的最小化,JVM管理一个全局锁缓存和一个单线程锁缓存,其中每个缓存包含了未分配的 pthread_mutex。
After locking that, it creates a new thread and increments threadcount; after it's done, it unlocks the mutex.
之后它创建一个新的线程同时增量threadcount;在完成之后,它解锁互斥量。
After locking that, it creates a new thread and increments threadcount; after it's done, it unlocks the mutex.
之后它创建一个新的线程同时增量threadcount;在完成之后,它解锁互斥量。
应用推荐