I cannot help you on the pthread question, but passing
parameters to modules is pretty simple. You must use
the MODULE_PARM(variable, type) macro outside the scope
of init_module() like this:
int myIntVar = 0;
char *myStrVar = NULL;
MODULE_PARM(myIntVar, "i");
MODULE_PARM(myStrVar, "s");
int init_module(void)
{
.
. /* do something useful */
.
printk("My integer value is %d, The string is %s\n", myIntVar,
myStrVar);
.
. /* do something useful */
.
return 0;
}
Then, specify the variables using insmod something like this:
insmod myNewModule myIntVar=10 myStrVar="This is from myNewModule"
Hope that helps,
Rich
-Original Message-
From: Yuhong Ren [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 10, 2001 7:55 AM
To: [EMAIL PROTECTED]
Subject: [rtl] How to change pthread's interval?
Dear All,
Once I set pthread_make_periodic_np(mytask, gettime(), interval), how
could I change the pthread's "interval" during its run time? Say, it has
been running at 5ms, how could I change it to 10ms without removing the
kernel module?
Also, another newbie question, before I "insmod" module, I think
I could pass some arguments to "init_module", how could I do it?
Thanks a lot for any hints.
Kind regards,
Yuhong
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | 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 " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/