Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-02-2005, 01:49 PM   #1
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Rep: Reputation: 30
realtime programming (c)


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?

Old 03-02-2005, 02:18 PM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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?
Old 03-02-2005, 03:13 PM   #3
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
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...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enahced Realtime Clock--Is It There? solarblast Linux - Newbie 0 03-05-2005 05:24 PM
xmms - realtime curmudgeon42 Linux - Software 1 01-29-2005 11:58 AM
Realtime record spotslayer Linux - Software 0 10-16-2004 09:45 AM
realtime-lsm denzo74 Mandriva 0 08-11-2004 04:45 AM
realtime monitor like CPU-Z tarheel92x Linux - Hardware 0 04-21-2004 12:55 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration