Robert & Patricia Warner wrote:
>
> I've got a RTLinux system up and running with aa couple of rtl tasks
> debugged and working. Now i'm attempting to add the needed application(s)
> on the linux side. One particular app is using pthreads and it has
> sucessfuly brought Linux to it's knees, after running for a short while.
>
> Does anyone know of any problems with RTLinux and pthreads that I shoudl be
> watching out for?
>
> Thanks
> Bob Warner
A few points.
1/ If you are creating threads within a thread, you may have a problem
on RTLinux as it uses kmalloc with GFP_KERNEL which is not advisable in
a real time context. Either create your tasks during the init_module,
or use the RTAI and it's pthreads module.
2/ If you are used to using the older API, you need to be aware that
when you create a pthread, it can start immediately. This means that
you must put the suspension point at the begining of the while loop not
the end, e.g.
void *task(void *arg)
{
// initialisation code
while(1) {
pthread_wait_np();
// working code of the task
}
}
Regards Stuart.
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/