RE: [rtl] How to change pthread's interval?

2001-02-12 Thread Jennings, Richard R

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/




[rtl] Problems including

2001-02-12 Thread Ivan Martinez

Hello all:
I don't know if this is RTLinux' fault (v2.3), but in my real-time
module if include  at the begining...

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

... I get a lot of parse errors, but at the end...

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

... everything is fine. Thank you.
-- 
Ivan Martinez (Rodriguez)
Bch in Software Engineering - MSc student
"Got fabes?"
-- [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/