[OpenAFS-devel] RX_ENABLE_LOCKS and AFS_GLOCK()

Nickolai Zeldovich kolya@MIT.EDU
Wed, 13 Feb 2002 15:11:29 -0500


> Is it really necessary to have AFS_GLOCK()/GUNLOCK() wrapped with an
> #ifdef RX_ENABLE_LOCKS everywhere in the source? It appears that the
> definitions of those macros are #ifdef'd already. Seems like it would
> clean up the code quite a bit to get rid of all the spurious ifdef's. 

There's RX_AFS_GLOCK() and RX_AFS_GUNLOCK() in the mainline (which
I snuck in with the dcache locking changes), which are defined to
be AFS_GLOCK/AFS_GUNLOCK when RX_ENABLE_LOCKS is set, and blank
otherwise.  So, you can replace the #ifdef/AFS_GLOCK/#endif combo
with RX_AFS_GLOCK, etc, if you want.

-- kolya