All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Locking in lib/boilerplate/hash.c
@ 2018-04-11 11:11 Jan Kiszka
  2018-04-11 13:10 ` Jan Kiszka
  2018-04-12  9:03 ` Philippe Gerum
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2018-04-11 11:11 UTC (permalink / raw)
  To: Philippe Gerum, Xenomai

Hi Philippe,

many users of the hash functions prefer (and actually have to) call
those services under an external lock to close race windows, e.g.
between lookup and entry usage. Still, those services come with their
own, internal lock. That seems to protect only the hash list, thus
leaves races on the entries open. I understand that some APIs (e.g.
psos) cannot solve that easily, but I wonder if the other users should
pay for the internal lock that is unneeded given an outer one.

IOW: How about pulling the internal lock out to the user, removing it
from hash.c?

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-12  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11 11:11 [Xenomai] Locking in lib/boilerplate/hash.c Jan Kiszka
2018-04-11 13:10 ` Jan Kiszka
2018-04-12  9:03 ` Philippe Gerum
2018-04-12  9:14   ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.