LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-17-2004, 09:09 PM   #1
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
kernel C code question


hi again ...
can someone tell me how i'm supposed to be interpreting this:

/* Return the current time and put it in *TIMER if TIMER is not NULL. */
extern time_t time (time_t *__timer) __THROW;

i guess the part that throws me off is the __timer and __THROW

what does __ in front of time mean. and what is __THROW?

once again ... thanks.
 
Old 05-17-2004, 09:23 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
__timer is just a variable. u can start variables with '_'. the __THROW i have no idea. it is not a gcc or cpp keyword to the best of my knowledge, or if it is i can't find it in the info pages for either. in c++ u "throw" exceptions, but i dont think this is that.
 
Old 05-17-2004, 09:38 PM   #3
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Original Poster
Rep: Reputation: 46
thnx for replying (again)...
yeah, i have no idea what that __THROW is supposed to do in C.
stupid question: is there any reason for using __ (it has nothing to do with namespaces in C, right?) in front of variables?

thnx once again.
 
Old 05-18-2004, 01:52 AM   #4
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
it i think, is mostly used to differentiate between the variables system uses for its own purposes...so that you dont come on and mess up the variables with your own variables...users are expected NOT to use __ in their variables ...
i has no other implication AFAIK


__THROW might be a compiler directive something like __attribute__(packed ) etc,

or a builtin gcc function to handle exceptions..just a guess tho...

Last edited by shishir; 05-18-2004 at 03:39 AM.
 
Old 05-18-2004, 08:30 AM   #5
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Original Poster
Rep: Reputation: 46
thanks you two.
 
  


Reply



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
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
casting question in kernel source code linetnew Programming 3 04-18-2005 04:55 AM
PHP code question latino Programming 2 08-26-2004 04:57 AM
for statement c code question dragoon linux Programming 3 12-31-2003 11:17 AM
Question on PSAD code? cxel91a Programming 0 09-05-2003 04:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration