Hallo,

I'm using here RTL-2.2 and the rtf to talk via the rtf-handler with a 
thread code. I have a  global variable 

unsigned int volatile rt_func_no; 

which is changed inside the rtf-handler:

    switch(rtf_msg.cmd) {
        ...
    case CMD_SET_FUNCTION:
      rt_func_no = (unsigned int)rtf_msg.data1;
      break;
        ...
    }

and the thread code:

void (*rt_func[RT_FUNC_MAX])(void); 

void *thread_code(void *param)
{
  while(1) {
    pthread_wait_np();

    rt_func[rt_func_no]();
}

If I switch between the different functions the system is frozen. I guess 
the thread dosn't know about the different functions (pointers) at 
run-time, or what is the reason? How to do in the correct manner ? I 
don't want the create a big thread pool.

Thanks olaf



Olaf Petzold    [EMAIL PROTECTED]
                http://www-hppool.cs.uni-magdeburg.de/~petzold/petzold.html

                Otto-von-Guericke-Universitaet zu Magdeburg

-- [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/

Reply via email to