spinlock

spinlock

 英

  • 网络自旋锁;结构锁;自旋块

例句

Finally, if your kernel thread shares data with a bottom half, then you can use another variant of the spinlock.

最后如果内核线程通过bottomhalf方式共享数据那么可以使用另一个变体

First you create a new spinlock through a simple declaration.

首先通过一个简单声明创建一个

In this example, an array is created of spinlock_t with a size of LOCK_COUNT.

这个示例,spinlock_t创建一个大小LOCK_COUNT数组

This version of the spinlock disables soft interrupts on the local CPU.

这种禁用本地CPU中断

The spin_unlock_irqrestore function releases the spinlock and restores the interrupts (via the flags argument).

spin_unlock_irqrestore函数释放并且通过flags参数恢复中断

The task in the session is waiting for a spinlock to become free.

会话任务正在等待调节变为可用

Make sure this copying happens inside the critical section by holding a spinlock.

确保这个拷贝一个具有临界发生

The spin_lock_irqsave function acquires the spinlock and disables interrupts on the local processor (in the SMP case).

spin_lock_irqsave函数需要并且本地处理器SMP情形禁用中断

The spinlock is needed here, because the kernel thread will be running independently and will access the global structure.

此处的确需要因为内核线程独立运行而且访问这个全局结构

Yes folks, there is a pseudo-spin lock and call to Threading. Sleep in there.

是的各位读者注意这里存在一个循环(pseudo-spinlock),调用Threading.Sleep。

I've used a combination of mutexes and spinlocks to keep things synchronized.

使用互斥spinlock组合方案保证同步

Now that you have a spinlock defined, there are a number of locking variants that you can use.

定义之后可以使用大量锁定变量

There are also four ways to release a spinlock; the one you use must correspond to the function you used to take the lock

以下种方法可以用来释放一个必须使用锁定函数相对应一个

There are actually four functions that can lock a spinlock

下面四个可以锁定一个函数