LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   realtime programming (c) (https://www.linuxquestions.org/questions/programming-9/realtime-programming-c-296792/)

os2 03-02-2005 01:49 PM

realtime programming (c)
 
hi

we create a real-time program on a embedded linux system.
the program will run a few time by second

i would like to know if it's better to create global variable or create the variable in the main and pass it to the function?

thanks

jtshaw 03-02-2005 02:18 PM

Id make it global to save time restoring the stack when you bounce back from your rt routine. I'm assuming your rt routine is effectively an interrupt handler?

os2 03-02-2005 03:13 PM

we have 3 program, two use interrupt handler but the last use only a sleep... this last program take some data of the others program and generate statistic...


All times are GMT -5. The time now is 08:41 PM.