[EMAIL PROTECTED] wrote:
>
> Last I checked, Jerry's packet did run in uniprocesor 2.0 but it
> has not been made SMP safe.
>From the mail that I sent to this mailing list last week:
Although the rt_ipc package is v0.3, it was modifed from
original v0.3 package. The rt_ipc.c file in rtl/semaphore
has the following pthread codes:
int rt_task_delay(RTIME duration)
{
...
/* mark the task as delayed */
pthread_self()->spec.it_value = RTIME_to_timespec(duration);
pthread_self()->spec.it_interval = RTL_TIME_ZERO;
pthread_self()->state = RTL_THREAD_DELAYED;
...
}
The compilation errors are the followings:
1. pthread_self() returns pthread_t data type(type-defined as struct
rtl_thread_struct date type defined in rtl/include/rtl_sched.h)
but the struct has no member named 'spec'.
2. RTL_TIME_ZERO is undeclared.
> It's great that Steve's package is available. We will add native
> mutex in the next minor release but it would be nice if
> the rtai new fifos package could be put in a compatability mode.
Yes. Steve's package is great. And adding native mutex to rtlinux-2.0
also sounds great. What is the difference between native mutex and
semaphore in rt_ipc?
> > Second, is it natually impossible to use blocking services
> > (e.g. rtf_sem_wait and rtf_sem_timed_wait, etc) in kernel module?
> > It may be neccesary in many real-time application.
>
> Can you provide an example? The problem here is that you want a Linux
> operation to block a real-time operation.
One of kernel threads may wait for a semaphore to be released.
Waiting in semaphore is not busy-waiting, why is it problem?
The following situation is such a case:
Kernel thread T:
while(1) {
wait for a semaphore S to be released;
do something;
}
Linux application A:
while(1) {
wait for a user command;
do something;
signal to the semaphore S; /* release semaphore */
}
Heo, Sung-Gwan
--- [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/