kfifo.h and NULL spinlocks

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

 



Hi.

I've read that kfifo.h uses spinlocks[1], and I also read that spinlocks
do busy waiting, so they might not be suitable for a loaded system.
Is that right?

Is it better if I use semaphores and use the functions that have
__ and that don't use the spinlock)? It means no extra work for me.

 __kfifo_get
 __kfifo_put

I read the source code and I noticed that nothing will happen if I use
a NULL spinlock and never call the functions that use them. Right?
I'll prefer to use a NULL spinlock than using a dummy one.

Also, I'd like to know if there's another API in the kernel for simple
circular buffers.

Regards.

[1] http://lwn.net/Articles/106560/

Regards,
Nelson.-

--
http://arhuaco.org
http://emQbit.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux