[Top][All Lists]

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

Re: RFC: Lightweight synchronization mechanism for gnumach v3

From: Agustina Arzille
Subject: Re: RFC: Lightweight synchronization mechanism for gnumach v3
Date: Wed, 20 Apr 2016 00:35:20 -0300

On 04/18/2016 04:50 PM, Samuel Thibault wrote:

- Instead of creating thread descriptors with malloc, I place them at the
   top of the stack.
This might be questionable too.  Is the goal just to save the
allocation?  I'm not sure it's worth making the code more complex just
for this (think about application-provided stack and such).

Actually, I found that not using malloc to create descriptors make things *less*
complex. You have a big chunk of memory, and you place a structure at the
top ... it doesn't matter whether it's user-supplied or freshly allocated. Also,
there's no need for recycling, since deallocating the stack has the effect of
deallocating the descriptor as well.

Anyway, as promised, here's the lib: https://github.com/avarzille/hlpt

Like I said before, I understand if people are uneasy with a whole new lib,
so feel free to pick what you feel is useful. In my opinion, the low-level lock
stuff should be added to glibc to replace most (all?) the spin locks.

As usual, I'm open to any questions, advice or criticism you may have :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]