Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Differance between Intrrupt and function

Reply
Thread Tools

Differance between Intrrupt and function

 
 
Harshankumar
Guest
Posts: n/a
 
      07-27-2005
Hello,
I have the following questions
1) can we pass the parameters to interrupt?

2)can we return the parameters from interrupt

Regards
harshan


 
Reply With Quote
 
 
 
 
Chris Torek
Guest
Posts: n/a
 
      07-27-2005
In article <dc7dif$825$(E-Mail Removed)>
Harshankumar <(E-Mail Removed)> wrote:
>Hello,
>I have the following questions
>1) can we pass the parameters to interrupt?


C (by which, in comp.lang.c, we mean "ANSI/ISO Standard C") does
not *have* interrupts, so this question makes no sense.

On the Ultrasparc, though, the answer is "yes". An interrupt
is simply a special data packet on the UPA bus, and it includes
three 64-bit words, two of which are essentially unrestricted.
This allows efficient cross-processor calls, among other things.

>2)can we return the parameters from interrupt


Again, C does not have interrupts.

In any case, "parameters" are inputs, and function return values
are outputs, so there is a high-level concept mismatch.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (4039.22'N, 11150.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a
 
      07-27-2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Harshankumar wrote:
> Hello,
> I have the following questions
> 1) can we pass the parameters to interrupt?
>
> 2)can we return the parameters from interrupt


As Chris Torek pointed out, there is no such thing as an "interrupt" in
C, so neither question makes sense in the context of this newsgroup.

However, the C language /does/ recognize the existance of a limited set
of asynchronous events ("signals"), and /does/ provide standard
functions to deal with these.

Two functions are defined for signal handling: signal(), which defines
the action to be taken on a signal, and raise(), which invokes the
signal. Signals are handled asynchronously, so that the raise() function
does not block waiting for the signal handler to be invoked.

raise() accepts a parameter which specifies which of several unique
signals is to be issued.

signal() accepts two parameters: a parameter which specifies which of
several unique signals is to be intercepted, and a second parameter
which specifies the function to be invoked when the identified signal is
intercepted.

Each signal may have it's own signal handler function; multiple signal
handlers are set by multiple calls to signal(), varying the signal
number and the associated function reference paramaters accordingly.

While signals can be initiated within a program using the raise()
function, they may also be initiated from outside the code path as well.
Not all signals may be initiated outside of the code path, though; the
list of signals that can be initiated this way is implementation dependant.


Is any of this usefull to you?
- --

Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFC58UYagVFX4UWr64RAlXQAJ9OW84Khdz1/aoa+bY+GHUAuWd+dwCg7xI7
P9bX7OcAgGC3Tzc2xTMw3iE=
=qj1E
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Differance Between Default Permissions in MS SharePoint Server 200 rawan ASP .Net 1 01-08-2009 06:02 AM
Differance between USB and USB2 Cable? Rob Computer Support 7 10-08-2006 09:32 PM
Video cards differance Richard Miller Computer Support 3 08-19-2006 05:23 AM
differance between binary file and ascii file vim C Programming 68 05-27-2006 08:47 PM
CD RW / CD RWR :- What's the differance Win Computer Support 31 04-09-2005 11:02 PM



Advertisments