Thread-Local Storage, C++ Support and SMP
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jul 5 07:33:12 UTC 2013
On 07/05/2013 03:10 AM, Gedare Bloom wrote:
> Sebastian,
> I have been working with the student to get the keys code mergeable. We have
> one last problem which maybe we can fix later. We need a generic freelist
> implementation for some unlimited mode allocations. This is a boundary case and
> can be ignored for now. I will push for code we can merge soon. It should fix
> #3 (not sure if cancellation was tested) and 4, and #5 when we get freelist
> merged. The code all exists just needs review, fix, and merge.
Its good that you work on this. Is it possible to get an overview of the data
structures and objects involved, because I am not that happy with some parts of
the patch posted to the list.
I would do it as follows:
Normal key objects which provide a tree root for key values (the thread ID is
the tree key), e.g. no global tree.
Key values are part of the corresponding key tree and in a list of key values
for the corresponding thread.
Each thread has a list of key values which is used to call the key destructors
for the key values associated with the thread.
The key values are not objects, but are pre-allocated in chunks. So we have
Configuration = {
.maximum_key_values = X | rtems_resource_unlimited(Y);
}
In case no free key values are available we allocate a new chunk if the
resource is unlimited or fail otherwise.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list