]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/blobdiff - Documentation/DocBook/kernel-locking.tmpl
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial
[lisovros/linux_canprio.git] / Documentation / DocBook / kernel-locking.tmpl
index 435413ca40dcb8148ebdc11c8634bf359af0f1c6..77c42f40be5d66ecb0b2235ef3dd1300301eafa8 100644 (file)
@@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the
  };
 
 -static DEFINE_MUTEX(cache_lock);
-+static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(cache_lock);
  static LIST_HEAD(cache);
  static unsigned int cache_num = 0;
  #define MAX_CACHE_SIZE 10
@@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation:
 -        int popularity;
  };
 
- static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(cache_lock);
 @@ -77,6 +84,7 @@
          obj->id = id;
          obj->popularity = 0;