Re: Subject: [PATCH 2/2] priority System V Semaphores

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

 



On Thu, 2011-12-22 at 15:00 +0200, Raz wrote:

> please correct me if am wrong, " posix semaphores
> are implemented with pi mutex. ..?" 

Probably not, that would be pointless. They might be implemented using a
mutex, but I've already looked at glibc this month and my eyes can't
handle more.

> I need a counting semaphore.
> vxWorks priority/fifo semaphores are different from posix semaphores in
> that the behaviour is defined on the semaphore and not the thread.

That doesn't make them sane locking primitives.

> Q: what happens if I want one posix semahore to be FIFO and another
> posix semaphore to be PRIO while both are used by the same
> thread.should i to change policies each time ?

If you need a counting semaphore your program is very likely not a
correct real-time application. So who cares what order things are woken
up in.

Semaphores don't have lock owners, therefore priority inheritance and
related schemes don't work, therefore you suffer from priority inversion
and thus your program is invalid.

Seriously, forget semaphores exist, they're a hysterical accident.
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux