Unix Programming - What does the declaration below mean?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2006 > What does the declaration below mean?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What does the declaration below mean?
Zheng Da

2006-10-21, 1:31 pm

Hello. I'm reading the source code of an OS, and confused by the following
declaration:
void handle_irq(word_t irq) __asm__("intctrl_t_handle_irq");
I think __asm__() should be used to tell gcc that the source code in it is
assemble language.
But what is it used for here?
It seems that it has a very different function here.

With regards
Zheng Da


Ulrich Eckhardt

2006-10-21, 7:32 pm

Zheng Da wrote:
> void handle_irq(word_t irq) __asm__("intctrl_t_handle_irq");
> I think __asm__() should be used to tell gcc that the source
> code in it is assemble language.


Don't think, RTFM! ;)

http://gcc.gnu.org/onlinedocs/gcc-4...html#Asm-Labels

Uli

--
http://www.erlenstar.demon.co.uk/unix/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com