Skip to contentSkip to conversation

rename locking functions

PATCH In review Jesper Juhl 1 participant 1 message Aug 18, 2005

lore
Share & tools
lore
#0 lore raw

cover rename locking functions

Consider the naming of these functions :

sema_init()
init_MUTEX()
init_MUTEX_LOCKED()
init_rwsem()

They are not named very consistent, the naming is confusing and ugly with the mix of case and some are named init_* and some *_init.

I propose to clean that up by renaming the functions so they end up as :

init_sema()
init_mutex()
init_mutex_locked()
init_rwsem()

Since these are very widely used functions a transition period is needed, so the patches I'm posting create wrapper functions with the old names for people to use until they get their code updated.
The patches also change all in-kernel code calling these functions to use the new names.

I'm only able to test on i386, so please look carefully at these changes. I'm currently running a kernel with the patches applied and everything seems fine.

--
Jesper Juhl