Add opr/lock.h and tidy locking macros
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 20 Oct 2012 22:14:41 +0000 (23:14 +0100)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 30 Oct 2012 09:56:27 +0000 (02:56 -0700)
commitf5a643ad6dbcbf1785eac274f9dec79ef65928f3
tree8ba278f0a54d2743b5772f47f515530fc19fb2bc
parent9607d0e7993f3dee7f70ae747ea9d0b8ba1404af
Add opr/lock.h and tidy locking macros

The MUTEX_* and CV_* macros leaked from RX a while ago - they mean
that most of the pthreaded tree has a dependency on RX, as well as
further confusing the difference between userspace and kernel.

Tidy all of this up so that we have opr_mutex_* and opr_cv_* macros
to handle portable locking, and use these throughout the userspace
tree. Only kernel code should now use MUTEX_* and CV_*.

Provide opr/lockstub.h as a header that can be used by non-pthreaded
code to easily stub out these functions.

Change-Id: I24be525c7667641134d50561ce7f1e2d752cdf1f
Reviewed-on: http://gerrit.openafs.org/8280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
52 files changed:
src/budb/db_dump.c
src/budb/dbs_dump.c
src/lwp/lock.c
src/lwp/lock.h
src/opr/Makefile.in
src/opr/NTMakefile
src/opr/lockstub.h [new file with mode: 0644]
src/opr/opr_lock.h [new file with mode: 0644]
src/rx/rx_pthread.h
src/rxgen/rpc_main.c
src/ubik/beacon.c
src/ubik/disk.c
src/ubik/lock.c
src/ubik/recovery.c
src/ubik/remote.c
src/ubik/ubik.c
src/ubik/ubik.p.h
src/ubik/ubikclient.c
src/ubik/vote.c
src/util/thread_pool.c
src/util/work_queue.c
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/fsstats.c
src/viced/host.c
src/viced/host.h
src/viced/serialize_state.c
src/viced/viced.c
src/viced/viced.h
src/vol/fssync-client.c
src/vol/fssync-debug.c
src/vol/fssync-server.c
src/vol/ihandle.c
src/vol/ihandle.h
src/vol/namei_ops.c
src/vol/partition.c
src/vol/salvaged.c
src/vol/salvsync-client.c
src/vol/salvsync-server.c
src/vol/vg_cache.c
src/vol/vg_scan.c
src/vol/vnode.c
src/vol/vnode_inline.h
src/vol/vol-salvage.c
src/vol/volume.c
src/vol/volume.h
src/vol/volume_inline.h
src/vol/vutil.c
src/volser/volmain.c
src/volser/volprocs.c
src/volser/volser.p.h
src/volser/voltrans.c