Hallo,

I'm using the rtf-handler (rtl-2.2) for setting commands to the rt-mod. The
goal is to change the  period of the rt-task. The Problem is the system is
halted, the task was running before. MagicSysRQ  doesn't work at this case. Who
can help ?

Thanks  Olaf


int rtf_handler(unsigned int fifo)
{
    rtf_msg_t rtf_msg;
    hrtime_t now;
    int ret;

    if(rtf_get(CTRL_FIFO, &rtf_msg, sizeof(rtf_msg)) > 0) {
        switch(rtf_msg.cmd) {
        ...
        case CMD_SET_PERIOD:            /* START */
            RTREG_DEBUG(3, "rtf cmd: Setting period for thread\n");

            /* check for correctness */
            if(rtf_msg.data1 >= PERIOD_NS_MIN && rtf_msg.data1 <= PERIOD_NS_MAX) {
                period_ns = (hrtime_t)rtf_msg.data1;
                now = gethrtime();
                if((ret = pthread_make_periodic_np(rt_thread, now + 1000, period_ns)) 
!= 0) {
                    RTREG_ERR("unable to make thread periodic (error %d) !\n", ret);
                }
            } else {
                RTREG_ERR("got invalid period_ns %d, command ignored\n", 
                          rtf_msg.data1);               
            }

            break;
        
        ...
        
-- [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