tubik-vos-20080403

LICENSE IPL10

build pthreaded vos
This commit is contained in:
Kevin McBride 2008-04-03 17:41:12 +00:00 committed by Derrick Brashear
parent 5f67c56945
commit 65e701fee4
3 changed files with 47 additions and 7 deletions

View File

@ -31,7 +31,9 @@ RX=../rx
VOLSEROBJS=volmain.o volprocs.o physio.o voltrans.o volerr.o volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o vscommon.o
VLSERVEROBJS=#vldbint.cs.o vldbint.xdr.o
VLSERVEROBJS=vldbint.cs.o vldbint.xdr.o vl_errors.o
VOSOBJS= vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o volint.cs.o
LWPOBJS=lock.o threadname.o
@ -49,12 +51,20 @@ FSINTOBJS=# afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o
RXOBJS=rx_pthread.o
objects= ${VOLSEROBJS} ${VLSERVEROBJS} ${LWPOBJS} ${LIBACLOBJS} \
objects= ${VOLSEROBJS} ${LWPOBJS} ${LIBACLOBJS} \
${UTILOBJS} ${DIROBJS} ${VOLOBJS} ${FSINTOBJS} ${RXOBJS}
LIBS=${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/util.a
vosobjects= ${VOSOBJS} ${VLSERVEROBJS} ${LIBACLOBJS} ${UTILOBJS} ${DIROBJS} \
${VOLOBJS} ${FSINTOBJS} ${RXOBJS}
all: volserver
LIBS= ${TOP_LIBDIR}/libcmd.a \
${TOP_LIBDIR}/libafsauthent.a \
${TOP_LIBDIR}/libafsrpc.a \
${TOP_LIBDIR}/libafsutil.a \
${TOP_LIBDIR}/libubik_pthread.a \
${TOP_LIBDIR}/libusd.a
all: volserver vos
COMPILE=${CC} ${CFLAGS} -c $?
@ -78,6 +88,12 @@ volint.ss.o: ${VOLSER}/volint.ss.c
${COMPILE}
volint.xdr.o: ${VOLSER}/volint.xdr.c
${COMPILE}
vsprocs.o: ${VOLSER}/vsprocs.c
${COMPILE}
vsutils.o: ${VOLSER}/vsutils.c
${COMPILE}
lockprocs.o: ${VOLSER}/lockprocs.c
${COMPILE}
assert.o: ${UTIL}/assert.c
${COMPILE}
@ -118,6 +134,12 @@ aclprocs.o: ${LIBACL}/aclprocs.c
netprocs.o: ${LIBACL}/netprocs.c
${COMPILE}
vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
$(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${VLSERVER} vl_errors -h vlserver
vl_errors.o: vl_errors.c
${COMPILE}
vldbint.cs.o: ${VLSERVER}/vldbint.cs.c
${COMPILE}
@ -199,16 +221,26 @@ afsint.ss.o: ${FSINT}/afsint.ss.c
afsint.xdr.o: ${FSINT}/afsint.xdr.c
${COMPILE}
vos.o: ${VOLSER}/vos.c
${COMPILE}
vos: vos.o ${VOSOBJS} ${VLSERVEROBJS} ${LIBS}
${CC} ${LDFLAGS} -o vos vos.o ${VOSOBJS} ${VLSERVEROBJS} ${LIBS} ${MT_LIBS} ${XLIBS}
volserver: ${objects} ${LIBS}
${CC} ${LDFLAGS} -o volserver ${objects} ${LIBS} ${MT_LIBS} ${XLIBS}
install: volserver
install: volserver vos
${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
${INSTALL} volserver ${DESTDIR}${afssrvlibexecdir}/volserver
${INSTALL} vos ${DESTDIR}${afssrvlibexecdir}/vos
${INSTALL} vos ${DESTDIR}${sbindir}/vos
dest: volserver
dest: volserver vos
${INSTALL} -d ${DEST}/root.server/usr/afs/bin
${INSTALL} volserver ${DEST}/root.server/usr/afs/bin/volserver
${INSTALL} vos ${DEST}/root.server/usr/afs/bin/vos
${INSTALL} vos ${DEST}/etc/vos
clean:
$(RM) -f *.o volserver core AFS_component_version_number.c

View File

@ -280,7 +280,11 @@ SendFile(usd_handle_t ufd, register struct rx_call *call, long blksize)
FD_ZERO(&in);
FD_SET((int)(ufd->handle), &in);
/* don't timeout if read blocks */
#if defined(AFS_PTHREAD_ENV)
select(((int)(ufd->handle)) + 1, &in, 0, 0, 0);
#else
IOMGR_Select(((int)(ufd->handle)) + 1, &in, 0, 0, 0);
#endif
#endif
error = USD_READ(ufd, buffer, blksize, &nbytes);
if (error) {
@ -390,7 +394,11 @@ ReceiveFile(usd_handle_t ufd, struct rx_call *call, long blksize)
FD_ZERO(&out);
FD_SET((int)(ufd->handle), &out);
/* don't timeout if write blocks */
#if defined(AFS_PTHREAD_ENV)
select(((int)(ufd->handle)) + 1, &out, 0, 0, 0);
#else
IOMGR_Select(((int)(ufd->handle)) + 1, 0, &out, 0, 0);
#endif
#endif
error =
USD_WRITE(ufd, &buffer[bytesread - bytesleft], bytesleft, &w);

View File

@ -55,7 +55,7 @@ RCSID
#include <afs/procmgmt.h> /* signal(), kill(), wait(), etc. */
#include <setjmp.h>
#include <volser_prototypes.h>
#include "volser_prototypes.h"
struct ubik_client *cstruct;
int verbose = 0;