unseen/unknown function definition in linux source
        Posted  
        
            by 
                Broncha
            
        on Programmers
        
        See other posts from Programmers
        
            or by Broncha
        
        
        
        Published on 2012-12-18T06:18:18Z
        Indexed on 
            2012/12/18
            11:12 UTC
        
        
        Read the original article
        Hit count: 451
        
Can any one please explain this piece of code I found in the linux kernel source. I see a lots of code like this in linux and minix kernel but dont seem to find what it does (even if C compilers support that kind of function definition)
/* IRQs are disabled and uidhash_lock is held upon function entry.
 * IRQ state (as stored in flags) is restored and uidhash_lock released
 * upon function exit.
 */
static void free_user(struct user_struct *up, unsigned long flags)
__releases(&uidhash_lock)
{
uid_hash_remove(up);
spin_unlock_irqrestore(&uidhash_lock, flags);
key_put(up->uid_keyring);
key_put(up->session_keyring);
kmem_cache_free(uid_cachep, up);
}
I cannot find out if this reference __releases(&uidhash_lock) before the parenthesis starts is allowed OR supported. (It sure is supported as it is in the linux kernel)
© Programmers or respective owner