[PATCH] posix: Reimplement POSIX Key manager to use a red-black tree.

Ashi ashi08104 at gmail.com
Tue Jul 30 01:38:33 UTC 2013


On Mon, Jul 29, 2013 at 11:18 AM, Gedare Bloom <gedare at rtems.org> wrote:

> I would put it back to the freechain unless there is a good way to check
> if the wkspace is almost all gone, which only is an issue for unlimited
> mode of some object.
>
I see.

> I do not have RTEMS in front of me to look at the code, but going from 4
> to 5 would change when the thread allocation occurs. How many pthreads in
> the test?
>
In the 4 case, there will be 363+1 threads, here "1" refers the POSIX_Init
thread. And in the 5 case, there will be 365+1 threads.

>  -Gedare
> On Jul 28, 2013 11:55 AM, "Ashi" <ashi08104 at gmail.com> wrote:
>
>> I'm updating this patch this days, but get stuck with several problems:
>>
>>   - when key deleting, should we just put the deleted node back to
>> freechain or run workspace_free on these deleted nodes?
>>
>>   - my current code (at:
>> https://github.com/ashi08104/rtems/tree/one_rbtree_add_fl) can't pass
>> the unlimited test cases (psxkey07 and psxkey08). I tried to debug it, but
>> still with no success until now. one interesting thing is when I change
>> following line in psxkey07/init.c:
>>
>> #define CONFIGURE_MAXIMUM_POSIX_THREADS  rtems_resource_unlimited(5)
>>
>> to:
>>
>> #define CONFIGURE_MAXIMUM_POSIX_THREADS  rtems_resource_unlimited(4)
>>
>> then, this test case will be OK. And change to different number of
>> rtems_resource_unlimited() would lead to different errors.
>> Could anyone give me some hints about this? If necessary, I can provide
>> more details. Thanks!
>>
>> --Zhongwei
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130730/1dc12908/attachment.html>


More information about the devel mailing list