HI
        All
                I have few doubts related to Threads.
                currently i am using linux 2.2.18 + rtlinux 3.0
                
        1) Is there any limit on Number threads one can use simulatenously..
                with out any performance degradation of the system, 
      2) And in my application if therere  is a need to maintaion different
timing
                values at different situations..
          whether there is any other method to mainatin this ,
          with out creating threads for each timing values.
       i felt having too many threads defenitely leads to schedulling
jitter.
         
          any comments on these from mailing lists???

      3) one more senario is suppose if my applivcation requires 4 different
kinds timers
        for different situations.. Currenlty i can go for 4 threads ( 3
minute threads, 1 second
         thread)
         among these 3 threads neads to be invoked after m1,m2,m3 minutes
and another
           4th one needs to be invoked after few seconds.
         and once these are invoked depending up on my controler module
requiremnt,
         my application will take acttions and again make the threads
periodic
       according to new timings.

       if this is the case, which of the following methods
        are efficient.......
                
           a) having 4 threads

           b) having single thread, it will wake up for every second... 
             in this thread it self i will handle minute timimg also
 
        

        or any other method which suits this..

any more suggestions/help from list..............


 advance thanks.
chandu
  
-----Original Message-----
From: Tomasz Motylewski [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 7:17 PM
To: Chandu Reddy K
Cc: [EMAIL PROTECTED]
Subject: Re: [rtl] Regd Shared Memory and function pointers


>   i will store  a function pointer of a function d
>    here i faced probem that i am not able to access function pointer
>     in linux appl.
>  its giving compiler error...
>  that functionname(), ....
> 
> whether doing this way is correct or not ???

Not. Kernel is different adress space, and your user program is not linked
with it.

Use indexes (like 1,2,3,4,5,6...) instead of pointers.

You can set up in the kernel array of function pointers:

int (*(functions[NNN]))() = { func1, func2, func3, ... };

functions[i]();  <- call this way.

--
Tomek

----- End of forwarded message from [EMAIL PROTECTED] -----
-- [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/

Reply via email to