Windows: Finish converting vol apps to pthread only

The src/vol directory on Windows is one of the rare examples
where a single directory builds both lwp and pthreaded versions
of libraries and executables.  With this patchset the executables
are fully converted from lwp to pthread.  This requires that
afsrpc.dll include the pthread implementations of the threadname,
fasttime, and lock implementations from the LWP directory.
The inclusion within afsrpc.dll permits the dviced and
dvolser directories to avoid rebuilding those object modules.

Reviewed-on: http://gerrit.openafs.org/3181
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5fce5754ce)
Change-Id: I3b2215f017aae91a91e1a1955f34bf149679223b
Reviewed-on: http://gerrit.openafs.org/3236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Jeffrey Altman 2010-10-28 01:19:17 -04:00 committed by Derrick Brashear
parent ab4e008a3b
commit 01c6e73f98
6 changed files with 54 additions and 29 deletions

View File

@ -340,7 +340,14 @@ dir: butm
$(NTMAKE)
$(CD) ..\..
vol: dir
libafsrpc: dir
@echo ***** $@
$(DOCD) $(SRC)\$@
$(CD) $(SRC)\$@
$(NTMAKE)
$(CD) ..\..
vol: libafsrpc
@echo ***** $@
$(DOCD) $(SRC)\$@
$(CD) $(SRC)\$@
@ -403,14 +410,7 @@ bu_utils: bosctlsvc
$(NTMAKE)
$(CD) ..\..
libafsrpc: bu_utils
@echo ***** $@
$(DOCD) $(SRC)\$@
$(CD) $(SRC)\$@
$(NTMAKE)
$(CD) ..\..
libafsauthent: libafsrpc
libafsauthent: bu_utils
@echo ***** $@
$(DOCD) $(SRC)\$@
$(CD) $(SRC)\$@

View File

@ -18,7 +18,6 @@ EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\dafileserver.exe
VICED = ..\viced
TVICED = ..\tviced
LWP = ..\lwp
LIBACL = ..\libacl
DIR = ..\dir
FSINT = ..\fsint
@ -33,15 +32,13 @@ TVICEDOBJS = $(OUT)\serialize_state.obj
DAFS_VICEDRES = $(OUT)\dafileserver.res
LWPOBJS = $(OUT)\lock.obj $(OUT)\fasttime.obj $(OUT)\threadname.obj
LIBACLOBJS = $(OUT)\aclprocs.obj $(OUT)\netprocs.obj
DIROBJS = $(OUT)\buffer.obj $(OUT)\dir.obj $(OUT)\salvage.obj
FSINTOBJS = $(OUT)\afsaux.obj $(OUT)\afscbint.cs.obj $(OUT)\afsint.ss.obj $(OUT)\afsint.xdr.obj
EXEOBJS = $(VICEDOBJS) $(TVICEDOBJS) $(DAFS_VICEDRES) $(LWPOBJS) $(LIBACLOBJS) \
EXEOBJS = $(VICEDOBJS) $(TVICEDOBJS) $(DAFS_VICEDRES) $(LIBACLOBJS) \
$(DIROBJS) $(FSINTOBJS) $(RXOBJS)
noversion: install
@ -60,9 +57,6 @@ $(DAFS_VICEDRES): dafileserver.rc AFS_component_version_number.h
$(TVICEDOBJS): $(TVICED)\$$(@B).c
$(C2OBJ) -I$(TVICED) $**
$(LWPOBJS): $(LWP)\$$(@B).C
$(C2OBJ) -I$(LWP) $**
$(LIBACLOBJS): $(LIBACL)\$$(@B).C
$(C2OBJ) -I$(LIBACL) $**

View File

@ -14,7 +14,6 @@ RELDIR=dvolser
VOLSER = ..\volser
DVOLSER = .
VLSERVER = ..\vlserver
LWP = ..\lwp
LIBACL = ..\libacl
UTIL = ..\util
DIR = ..\dir
@ -68,15 +67,12 @@ VOLSERVER_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\davolserver.exe
VOLSEROBJS=$(OUT)\volmain.obj $(OUT)\volprocs.obj $(OUT)\physio.obj $(OUT)\voltrans.obj $(OUT)\dumpstuff.obj
LWPOBJS=$(OUT)\lock.obj $(OUT)\threadname.obj $(OUT)\fasttime.obj
LIBACLOBJS=$(OUT)\aclprocs.obj $(OUT)\netprocs.obj
DIROBJS=$(OUT)\buffer.obj $(OUT)\dir.obj $(OUT)\salvage.obj
VOLSERVER_EXEOBJS = $(VOLSEROBJS) \
$(VLSERVEROBJS) \
$(LWPOBJS) \
$(LIBACLOBJS) \
$(DIROBJS) \
$(FSINTOBJS) \
@ -110,9 +106,6 @@ $(OUT)\vscommon.obj: $(VOLSER)\common.c
$(VOLSEROBJS): $(VOLSER)\$$(@B).c
$(C2OBJ) -I$(VOLSER) -I$(UTIL) $**
$(LWPOBJS): $(LWP)\$$(@B).C
$(C2OBJ) -I$(LWP) $**
$(LIBACLOBJS): $(LIBACL)\$$(@B).C
$(C2OBJ) -I$(LIBACL) $**

View File

@ -17,6 +17,7 @@ DES = ..\des
UTIL = ..\util
FSINT = ..\fsint
COMERR = ..\comerr
LWP = ..\lwp
# Additional debugging flag for RX.
!IF ("$(AFSDEV_BUILDTYPE)" == "CHECKED")
@ -53,12 +54,14 @@ UTILOBJS = $(OUT)\casestrcpy.obj $(OUT)\winsock_nt.obj
COMERRBJS = $(OUT)\error_msg.obj $(OUT)\et_name.obj $(OUT)\com_err.obj
LWPOBJS = $(OUT)\lock.obj $(OUT)\fasttime.obj $(OUT)\threadname.obj
FSINTBJS = $(OUT)\afsint.cs.obj $(OUT)\afsint.xdr.obj $(OUT)\afscbint.cs.obj $(OUT)\afscbint.xdr.obj \
$(OUT)\afsaux.obj
DLLOBJS = $(MULTIOBJS) $(RXOBJS) $(XDROBJS) $(RXSTATBJS) $(LIBRXKAD_OBJS) \
$(DESOBJS) $(LIBRXKAD_REGOBJS) $(UTILBJS) $(COMERRBJS) \
$(FSINTBJS) $(OUT)\afsrpc.res
$(FSINTBJS) $(LWPOBJS) $(OUT)\afsrpc.res
$(MULTIOBJS) $(RXOBJS) $(XDROBJS):$(RX)\$$(@B).c
$(C2OBJ) $** -I$(RX)
@ -84,6 +87,9 @@ $(FSINTBJS):$(FSINT)\$$(@B).c
$(UTILOBJS):$(UTIL)\$$(@B).c
$(C2OBJ) $** -I$(UTIL)
$(LWPOBJS): $(LWP)\$$(@B).C
$(C2OBJ) $** -I$(LWP)
NTMAKE = nmake /nologo /f ntmakefile
@ -134,4 +140,4 @@ libstub:
$(DESTDIR)\lib\afsrpc.exp
clean::
$(DEL) $(DESTDIR)\lib\afsrpc.dll $(DESTDIR)\lib\afsrpc.lib $(DESTDIR)\lib\afsrpc.exp
$(DEL) $(DESTDIR)\lib\afsrpc.dll $(DESTDIR)\lib\afsrpc.lib $(DESTDIR)\lib\afsrpc.exp

View File

@ -269,6 +269,21 @@ EXPORTS
; rx_InterruptCall @274
osi_Panic @275
; lwp functions
Afs_Lock_Obtain @276
Afs_Lock_ReleaseR @277
Afs_Lock_ReleaseW @278
Afs_Lock_WakeupR @279
Lock_Init @280
Lock_Destroy @281
FT_Init @282
FT_GetTimeOfDay @283
FT_AGetTimeOfDay @284
FT_ApproxTime @285
threadname @286
registerthread @287
swapthreadname @288
; for performance testing
rx_TSFPQGlobSize @2001 DATA
rx_TSFPQLocalMax @2002 DATA

View File

@ -170,11 +170,10 @@ $(DAFS_LIBFILE): $(DAFS_LIBOBJS)
EXEC_LIBS = \
$(DESTDIR)\lib\afs\afscmd.lib \
$(DESTDIR)\lib\afs\afsvol.lib \
$(DESTDIR)\lib\afs\afsutil.lib \
$(DESTDIR)\lib\afs\mtafsvol.lib \
$(DESTDIR)\lib\afs\mtafsutil.lib \
$(DESTDIR)\lib\afsrpc.lib \
$(DESTDIR)\lib\afs\afsdir.lib \
$(DESTDIR)\lib\afsrx.lib \
$(DESTDIR)\lib\afslwp.lib \
$(DESTDIR)\lib\afs\afsacl.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
@ -185,6 +184,15 @@ EXEC_LIBS = \
# build salvager
SALVAGER = $(DESTDIR)\root.server\usr\afs\bin\salvager.exe
$(OUT)\salvager.obj: salvager.c
$(C2OBJ) $** -DAFS_PTHREAD_ENV
$(OUT)\vol-salvage.obj: vol-salvage.c
$(C2OBJ) $** -DAFS_PTHREAD_ENV
$(OUT)\physio.obj: physio.c
$(C2OBJ) $** -DAFS_PTHREAD_ENV
SALVAGER_EXEOBJS =\
$(OUT)\salvager.obj \
$(OUT)\vol-salvage.obj \
@ -204,6 +212,9 @@ $(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS)
# build fssync-debug
FSSYNC_DEBUG = $(DESTDIR)\root.server\usr\afs\bin\fssync-debug.exe
$(OUT)\fssync-debug.obj: fssync-debug.c
$(C2OBJ) $** -DAFS_PTHREAD_ENV
FSSYNC_DEBUG_EXEOBJS =\
$(OUT)\fssync-debug.obj \
$(OUT)\AFS_component_version_number.obj \
@ -220,6 +231,9 @@ $(FSSYNC_DEBUG): $(FSSYNC_DEBUG_EXEOBJS) $(EXEC_LIBS)
# build volinfo
VOLINFO = $(DESTDIR)\root.server\usr\afs\bin\volinfo.exe
$(OUT)\vol-info.obj: vol-info.c
$(C2OBJ) $** -DAFS_PTHREAD_ENV
$(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS)
$(EXECONLINK) shell32.lib
$(_VC_MANIFEST_EMBED_EXE)
@ -231,6 +245,9 @@ $(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS
# build volinfo
VOLBLESS = $(DESTDIR)\root.server\usr\afs\bin\vol-bless.exe
$(OUT)\vol-bless.obj: vol-bless.c
$(C2OBJ) $** -DAFS_PTHREAD_ENV
$(VOLBLESS): $(OUT)\vol-bless.obj $(OUT)\physio.obj $(OUT)\vol-bless.res $(EXEC_LIBS)
$(EXECONLINK) shell32.lib
$(_VC_MANIFEST_EMBED_EXE)