函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:kernel\locking\lockdep.c Create Date:2022-07-27 10:50:30
首页 Copyright©Brick

4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
#undef lock_set_class
void lock_set_class(struct lockdep_map *lock, const char *name,
            struct lock_class_key *key, unsigned int subclass,
            unsigned long ip)
{
    unsigned long flags;
 
    if (unlikely(current->lockdep_recursion))
        return;
 
    raw_local_irq_save(flags);
    current->lockdep_recursion = 1;
    check_flags(flags);
    if (__lock_set_class(lock, name, key, subclass, ip))
        check_chain_key(current);
    current->lockdep_recursion = 0;
    raw_local_irq_restore(flags);
}