rename locking functions - do the rename
PATCH 1/7 rename locking functions - do the rename
This patch renames sema_init to init_sema, init_MUTEX to init_mutex and init_MUTEX_LOCKED to init_mutex_locked and at the same time creates 3 (deprecated) wrapper functions with the old names.
---
include/asm-alpha/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-arm/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-arm26/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-cris/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-frv/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-h8300/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-i386/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-ia64/semaphore.h | 34 ++++++++++++++++++++++++++-------- include/asm-m32r/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-m68k/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-m68knommu/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-mips/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-parisc/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-ppc/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-ppc64/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-s390/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-sh/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-sh64/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-sparc/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-sparc64/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-v850/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-x86_64/semaphore.h | 31 ++++++++++++++++++++++++++----- include/asm-xtensa/semaphore.h | 31 ++++++++++++++++++++++++++----- 23 files changed, 598 insertions(+), 118 deletions(-)
include/asm-alpha/semaphore.h +26 -5
@@ -35,7 +35,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {/* * Logically,
@@ -47,14 +47,35 @@ static inline void sema_init(struct semainit_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void down (struct semaphore *);
include/asm-arm/semaphore.h +26 -5
@@ -32,21 +32,42 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic_set (&sem->count, val); sem->sleepers =0 ;init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }static inline int sema_count (struct semaphore *sem)
include/asm-arm26/semaphore.h +26 -5
@@ -34,21 +34,42 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic_set (&sem->count, val); sem->sleepers =0 ;init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }/*
include/asm-cris/semaphore.h +26 -5
@@ -42,19 +42,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -extern inline void sema_init (struct semaphore *sem,int val) +extern inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER ((*sem),val); } -extern inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -extern inline void init_MUTEX_LOCKED (struct semaphore *sem) +extern inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +extern inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void __down (struct semaphore * sem);
include/asm-frv/semaphore.h +26 -5
@@ -56,19 +56,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER (*sem, val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void __down (struct semaphore *sem,unsigned long flags);
include/asm-h8300/semaphore.h +26 -5
@@ -44,19 +44,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER (*sem, val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down_failed(void /* special register calling convention */);
include/asm-i386/semaphore.h +26 -5
@@ -64,7 +64,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {/* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
@@ -77,14 +77,35 @@ static inline void sema_init (struct seminit_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } fastcall void __down_failed(void /* special register calling convention */);
include/asm-ia64/semaphore.h +26 -8
@@ -32,22 +32,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name, 1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name, 0) -static inline void -sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER (*sem, val); } -static inline void -init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void -init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) +{ +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) { -sema_init (sem,0 ); +init_mutex_locked (sem); }extern void __down (struct semaphore * sem);
include/asm-m32r/semaphore.h +26 -5
@@ -41,7 +41,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {/* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
@@ -54,14 +54,35 @@ static inline void sema_init (struct seminit_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down_failed(void /* special register calling convention */);
include/asm-m68k/semaphore.h +26 -5
@@ -45,19 +45,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER (*sem, val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down_failed(void /* special register calling convention */);
include/asm-m68knommu/semaphore.h +26 -5
@@ -44,19 +44,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -extern inline void sema_init (struct semaphore *sem,int val) +extern inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER (*sem, val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down_failed(void /* special register calling convention */);
include/asm-mips/semaphore.h +26 -5
@@ -54,20 +54,41 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name, 1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name, 0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic_set (&sem->count, val);init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void __down (struct semaphore * sem);
include/asm-parisc/semaphore.h +26 -5
@@ -58,19 +58,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -extern inline void sema_init (struct semaphore *sem,int val) +extern inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER ((*sem),val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }static inline int sem_getcount (struct semaphore *sem)
include/asm-ppc/semaphore.h +26 -5
@@ -46,20 +46,41 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name, 1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name, 0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic_set (&sem->count, val);init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void __down (struct semaphore * sem);
include/asm-ppc64/semaphore.h +26 -5
@@ -40,20 +40,41 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name, 1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name, 0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic_set (&sem->count, val);init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void __down (struct semaphore * sem);
include/asm-s390/semaphore.h +26 -5
@@ -38,19 +38,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER ((*sem),val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down(struct semaphore * sem);
include/asm-sh/semaphore.h +26 -5
@@ -42,7 +42,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {/* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
@@ -55,14 +55,35 @@ static inline void sema_init (struct seminit_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }#if 0
include/asm-sh64/semaphore.h +26 -5
@@ -49,7 +49,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {/* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
@@ -62,14 +62,35 @@ static inline void sema_init (struct seminit_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }#if 0
include/asm-sparc/semaphore.h +26 -5
@@ -31,21 +31,42 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic24_set (&sem->count, val); sem->sleepers =0 ;init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void __down (struct semaphore * sem);
include/asm-sparc64/semaphore.h +26 -5
@@ -31,20 +31,41 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name, 1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name, 0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {atomic_set (&sem->count, val);init_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }extern void up (struct semaphore *sem);
include/asm-v850/semaphore.h +26 -5
@@ -27,19 +27,40 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC (name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC (name,0) -extern inline void sema_init (struct semaphore *sem,int val) +extern inline void init_sema (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER ((*sem),val); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); }/*
include/asm-x86_64/semaphore.h +26 -5
@@ -65,7 +65,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static inline void sema_init (struct semaphore *sem,int val) +static inline void init_sema (struct semaphore *sem,int val) {/* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
@@ -78,14 +78,35 @@ static inline void sema_init (struct seminit_waitqueue_head (&sem->wait); } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down_failed(void /* special register calling convention */);
include/asm-xtensa/semaphore.h +26 -5
@@ -47,7 +47,7 @@ struct semaphore {#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -extern inline void sema_init (struct semaphore *sem,int val) +extern inline void init_sema (struct semaphore *sem,int val) {/* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
@@ -62,14 +62,35 @@ extern inline void sema_init (struct sem#endif } -static inline void init_MUTEX (struct semaphore *sem) +/* sema_init has been renamed init_sema, please use the new name. +This function will go away in the near future */ +static inline void __deprecated sema_init (struct semaphore *sem,int val) { -sema_init (sem,1 ); +init_sema (sem, val); } -static inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_mutex (struct semaphore *sem) { -sema_init (sem,0 ); +init_sema (sem,1 ); +} + +/* init_MUTEX has been renamed init_mutex, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX (struct semaphore *sem) +{ +init_mutex (sem); +} + +static inline void init_mutex_locked (struct semaphore *sem) +{ +init_sema (sem,0 ); +} + +/* init_MUTEX_LOCKED has been renamed init_mutex_locked, please use the new name. +This function will go away in the near future */ +static inline void __deprecated init_MUTEX_LOCKED (struct semaphore *sem) +{ +init_mutex_locked (sem); } asmlinkage void __down(struct semaphore * sem);
Quoted 3 lines · Jesper Juhl
This patch renames
sema_inittoinit_sema,init_MUTEXtoinit_mutexandinit_MUTEX_LOCKEDtoinit_mutex_lockedand at the same time creates 3 (deprecated) wrapper functions with the old names.
What's the point? There's not need for totally gratious renaming.
Quoted 7 lines · Christoph Hellwig
Quoted 3 lines · Jesper Juhl
This patch renames
sema_inittoinit_sema,init_MUTEXtoinit_mutexandinit_MUTEX_LOCKEDtoinit_mutex_lockedand at the same time creates 3 (deprecated) wrapper functions with the old names.What's the point? There's not need for totally gratious renaming.
I don't consider this "gratious renaming". I didn't do this just because I could. I did it because the names used in the locking API are quite inconsistent and not exactely pretty. I did it to make things cleaner, neater, more consistent - to do everyone a favour.
Yes, it's just renaming of functions, it doesn't actually change any behaviour, but why should we have to live with less-than-perfect naming when we can clean it up?
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html