You can use the RTLinux user-level signal feature.

In a user-program linked with librtlinux.a to setup handler() to run at 20
Hz:

struct rtlinux_sigaction sig, oldsig;
sig.sa_handler = handler;
sig.sa_flags = RTLINUX_SA_PERIODIC;
sig.sa_period = NSECS_PER_SEC/20;
rtlinux_sigaction( RTLINUX_SIGTIMER0, &sig, &oldsig );

Just like normal sigaction semantics.

}     I want to create a thread (or process) that executes on a regular
} basis (about 20 times per second - 20 hz) in user space.  Doing this
} using the rtlinux thread library in kernel space is very easy, but it
} does not appear to be the case in user space using the regular pthread
} library in linux.  Another method of doing this would be to utilize a
} rtlinux timer or thread in a module but I'm unsure of how to trigger a
} function in user space from an event in rtlinux.  What I'm trying to do
} is create an interrupt driven read/write function in user space to send
} and poll for messages over a tcp/ip connection.  The messages being sent
} over tcp/ip do not need to occur in real-time, so a simple 'is there a
} message?  okay - send it or receive it' will work.  Anyone have any
} ideas on this?
} 
} Troy Davis
} Airborne Data Systems, Inc.
} 
} -- [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/
-- [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