__throw


 
Thread Tools Search this Thread
Top Forums Programming __throw
# 1  
Old 09-02-2008
__throw

Hi All,

We are fixing an application, and to do this we've used GDB.
We have a coredump file, therefore we can print a backtrace and watch the variables content at the moment of the crash.

This is the outcome of bt gd command:

0 0x0ffab7dc in __pthread_rwlock_unlock (rwlock=0x109db640) at ../nptl/sysdeps/pthread/pthread_rwlock_unlock.c:30
#1 0x1047a3a0 in m_rcv (unit=0, pkt=0x109dccfc, cookie=0x1090ffc8)
at net.c:284
#2 0x103c1640 in packet (unit=0, pkt=0x109dccfc) at packet.c:2505

In the line 30 of the file pthread_rwlock_unlock.c there is a calling to pthread_rwlock_unlock() function, but gdb shows __pthread_rwlock_unlock.

After realizing this, we looked for the definition of pthread_rwlock_unlock and we found the following:

extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW;

Somebody knows what is the meaning of __THROW???

Thanks !!!!!

P.D. We are using gcc and Linux
# 2  
Old 09-16-2008
Java RE: __throw

__THROW is a macro which is setup by the headers to evaluate to blank in C and throw() in C++. That throw() does is specify the list of types of exceptions that the function may throw. With nothing between the parenthesis, this is a blank list, and means the function declaration is promising to not throw any exceptions at all.

I am sure this is tagged onto library calls for the sake of allowing better performance/optimization when called from C++.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question