Re: Locking/mutex for snd_pcm_update_hw_ptr0() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Young wrote:
> On 07/11/16 14:15, Clemens Ladisch wrote:
>> Alan Young wrote:
>>> It is possible that the DMA interrupt handler could call
>>> snd_pcm_update_hw_ptr0() while it is part way through a call
>>> from snd_pcm_status(), or vice versa?
>>
>> The *lock_irq* functions disable interrupts on the current CPU.
>
> But only on the current CPU? So that would imply that multiple threads
> could execute snd_pcm_update_hw_ptr0() simultaneously on multi-CPU
> systems.

That's what the lock is for.

> I presume that the interrupt handler cannot be pre-empted by a user-
> space call such as snd_pcm_status().

During execution of an interrupt handler, interrupts also are disabled.


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux