shell error

bin.wang at qkmtech.com bin.wang at qkmtech.com
Wed Jan 24 02:08:40 UTC 2018


On Tue, Jan 23, 2018 at 9:48 AM, Gedare Bloom<gedare at rtems.org>
<Gedare Bloom<gedare at rtems.org>> wrote:
>Your code needs to configure the kernel required resources as needed
>by your application. In this case, the shell is using a pthread key,
>so it should be configuring an extra POSIX_KEY. The mentioned approach
>can fix the problem because it simply configures all objects without
>limits. A better solution is to understand how many of each kind of
>kernel object your application needs and to configure exactly that, so
>as to reduce the resource overhead. Note, though, that the unified
>work area means the C program heap and the kernel objects reside in
>the same memory, so that there is no set-aside for kernel space, so
>the configure unlimited is less problematic in this situation. But,
>you could have an allocation failure eventually.
> 
>For more details you may read
>https://docs.rtems.org/branches/master/c-user/configuring_a_system.html

think you very much 
yes ,i add the POSIX_KEY resource 
#define CONFIGURE_MAXIMUM_POSIX_KEYS 1

and remove the 
#define CONFIGURE_UNLIMITED_OBJECTS
#define CONFIGURE_UNIFIED_WORK_AREAS

the shell  works . 

yes ,i have read the chapter of the c-user configure. 
another question: what is the posix key? i did not find any description in the posix user document.
and i also did not find any useful information on the google

best wishes 
ben





>Hello Ben,
> 
>On Tue, Jan 23, 2018 at 3:13 AM, bin.wang at qkmtech.com
><bin.wang at qkmtech.com> wrote:
>> hi everyone:
>>
>> i use the shell , but i get the error print as follows:
>>
>> "pthread_setspecific(shell_current_env_key)"
>>
>> so i search this problem, and  find someone has asked this question before,
>> somebody replied as "add the two defines"
>>
>> #define CONFIGURE_UNLIMITED_OBJECTS
>> #define CONFIGURE_UNIFIED_WORK_AREAS
>>
>> this solve the problem as i come up with,but i do not know why?
>>
>Your code needs to configure the kernel required resources as needed
>by your application. In this case, the shell is using a pthread key,
>so it should be configuring an extra POSIX_KEY. The mentioned approach
>can fix the problem because it simply configures all objects without
>limits. A better solution is to understand how many of each kind of
>kernel object your application needs and to configure exactly that, so
>as to reduce the resource overhead. Note, though, that the unified
>work area means the C program heap and the kernel objects reside in
>the same memory, so that there is no set-aside for kernel space, so
>the configure unlimited is less problematic in this situation. But,
>you could have an allocation failure eventually.
> 
>For more details you may read
>https://docs.rtems.org/branches/master/c-user/configuring_a_system.html
> 
>Gedare
> 
>> best
>> ben
>>
>>
>>
>> ________________________________
>> bin.wang at qkmtech.com
>>
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20180124/dde967eb/attachment-0002.html>


More information about the users mailing list