Skip to main content
Sign in
Snippets Groups Projects
Select Git revision
  • android-msm-flo-3.4-kitkat-mr1
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

mutex.h

Blame
  • mutex.h 1.27 KiB
    /*
     * Mutexes: blocking mutual exclusion locks
     *
     * started by Ingo Molnar:
     *
     *  Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
     *
     * This file contains mutex debugging related internal prototypes, for the
     * !CONFIG_DEBUG_MUTEXES case. Most of them are NOPs:
     */
    
    #define spin_lock_mutex(lock, flags) \
    		do { spin_lock(lock); (void)(flags); } while (0)
    #define spin_unlock_mutex(lock, flags) \
    		do { spin_unlock(lock); (void)(flags); } while (0)
    #define mutex_remove_waiter(lock, waiter, ti) \
    		__list_del((waiter)->list.prev, (waiter)->list.next)
    
    #ifdef CONFIG_SMP
    static inline void mutex_set_owner(struct mutex *lock)
    {
    	lock->owner = current;
    }
    
    static inline void mutex_clear_owner(struct mutex *lock)
    {
    	lock->owner = NULL;
    }
    #else
    static inline void mutex_set_owner(struct mutex *lock)
    {
    }
    
    static inline void mutex_clear_owner(struct mutex *lock)
    {
    }
    #endif
    
    #define debug_mutex_wake_waiter(lock, waiter)		do { } while (0)
    #define debug_mutex_free_waiter(waiter)			do { } while (0)
    #define debug_mutex_add_waiter(lock, waiter, ti)	do { } while (0)
    #define debug_mutex_unlock(lock)			do { } while (0)
    #define debug_mutex_init(lock, name, key)		do { } while (0)
    
    static inline void
    debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
    {
    }