Posix api and Rtems-Shell
Joel Sherrill
joel.sherrill at OARcorp.com
Wed Dec 24 15:26:08 UTC 2008
Chris Johns wrote:
> rtwas wrote:
>
>> I'd like to use the *Shell* api with Posix. Reading the docs I see that
>> when Shell is init'd "rtems_shell_init()"
>> that a *Task* is launched. Posix uses *Threads*. Can Tasks and Threads
>> coexist in the same executable?
>>
>
> Yes. Take a look at:
>
> http://www.rtems.org/wiki/index.php/Image:RTEMSArchitecture.png
>
> and you will see the API layer with SAPI, Classic API, POSIX and more above
> the SuperCore. All tasks or threads are managed by the SuperCore and can coexist.
>
>
>> If so
>> it implies some other possible contentions, like initializing both
>> *Classic Api* and *Posix Api* and their associated
>> *entry points*.
>>
>
> Yes you need to initialise the Classic API and the POSIX API.
>
And this is done from rtems_initialize_data_structures. :)
FWIW the ability to mix and match tasks and tasking objects
from multiple APIs is a BIG benefit of RTEMS. POSIX threads
can use Classic API features.
All tasks/threads are actually SuperCore threads and are created
with appropriate attributes for their API. So POSIX threads are
created with attributes that match the POSIX standard.
> Regards
> Chris
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list