All of lore.kernel.org
 help / color / mirror / Atom feed
* futex API docs?
@ 2002-10-08 11:24 Francesc Oller
  0 siblings, 0 replies; only message in thread
From: Francesc Oller @ 2002-10-08 11:24 UTC (permalink / raw)
  To: linux-kernel

Hi all!

I've been trying to understand how futexes work looking at the last
dev. kernel. I've not found any docs. Are there any?

Basically:

P (fast P sem op):

  if (atomic_decrement(sem)<0)
    sys_futex(..,FUTEX_WAIT,....);

V (fast V sem op):

  if (atomic_increment(sem)<=0)
    sys_futex(..,FUTEX_WAKE,....);

Futexes need be counting semaphores since there could be WAKEs in
the middle of atomic_decrements and WAITs (not atomic) but I do
not see this in the code. I can't find the kernel counter in the
sources

Can anybody help me?

Many thanks in advance

Please CC to my e-mail since I'm not subscribed.

Cheers

Francesc

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-08 11:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-08 11:24 futex API docs? Francesc Oller

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.