[haiku-development] Re: The new locking primitives and boosting -- I need some guidance here :)

On Wed, Jun 25, 2008 at 18:49, Rene Gollent <anevilyak@xxxxxxxxx> wrote:
> I believe it's already 40 bytes due to structure padding.

Heh. If true, that would be quite nice, but I don't see why the
compiler would pad to 40 bytes when it's already 36. Pentium 8-byte
alignment optimization? Isn't that only for stacks?

> Except that in practice, responsiveness on Linux tends to suck in my
> experience, so obviously that approach isn't working so well. Imo
> priority inheritance is probably the better approach anyways, since
> this also lends itself well to dealing with things like priority
> inversion deadlocks and such.

And since that would already require an extra field in sem_info to
hold the priority of the largest priority among blocked threads... ;)
(I don't need a full integer, a short would do; priority levels only
need a char; so an additional struct {short, short} is all that I need
from sem_info to implement BOTH priority inheritance and brand-based
boosting)

Cheers,
A.

Other related posts: