LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 03-02-2005, 01:49 PM   #1
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: Suse 10
Posts: 206

Rep: Reputation: 30
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
 
Old 03-02-2005, 02:18 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 65
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
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: Suse 10
Posts: 206

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...
 
  


Reply


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


All times are GMT -5. The time now is 03:54 AM.

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