~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/linux/mutex.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        spinlock_t              wait_lock;
52
52
        struct list_head        wait_list;
53
53
#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP)
54
 
        struct thread_info      *owner;
 
54
        struct task_struct      *owner;
55
55
#endif
56
56
#ifdef CONFIG_DEBUG_MUTEXES
57
57
        const char              *name;
132
132
 */
133
133
#ifdef CONFIG_DEBUG_LOCK_ALLOC
134
134
extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
 
135
extern void _mutex_lock_nest_lock(struct mutex *lock, struct lockdep_map *nest_lock);
135
136
extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock,
136
137
                                        unsigned int subclass);
137
138
extern int __must_check mutex_lock_killable_nested(struct mutex *lock,
140
141
#define mutex_lock(lock) mutex_lock_nested(lock, 0)
141
142
#define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
142
143
#define mutex_lock_killable(lock) mutex_lock_killable_nested(lock, 0)
 
144
 
 
145
#define mutex_lock_nest_lock(lock, nest_lock)                           \
 
146
do {                                                                    \
 
147
        typecheck(struct lockdep_map *, &(nest_lock)->dep_map);         \
 
148
        _mutex_lock_nest_lock(lock, &(nest_lock)->dep_map);             \
 
149
} while (0)
 
150
 
143
151
#else
144
152
extern void mutex_lock(struct mutex *lock);
145
153
extern int __must_check mutex_lock_interruptible(struct mutex *lock);
148
156
# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
149
157
# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
150
158
# define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock)
 
159
# define mutex_lock_nest_lock(lock, nest_lock) mutex_lock(lock)
151
160
#endif
152
161
 
153
162
/*