Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 1995 10:02:03 -0800
From:      Nate Williams <nate>
To:        CVS-commiters, cvs-gnu
Subject:   cvs commit: src/gnu/usr.bin/cvs/cvs lock.c
Message-ID:  <199503311802.KAA29357@freefall.cdrom.com>

next in thread | raw e-mail | index | archive | help
nate        95/03/31 10:02:03

  Modified:    gnu/usr.bin/cvs/cvs lock.c
  Log:
  The enclosed patch contains two separate improvements to CVS' lock
  file handling code.
  
  The first is a change to set_lock().  It no longer takes an lockdir
  argument, instead it computes the lock directory itself and stores it
  in a new file-global array masterlock.  A new function clear_lock() is
  used to remove the master lock directory.
  
  Using the masterlock array avoids having to sprintf() together the
  lock directory path multiple times in each lock function, and avoids
  adding another PATH_MAX sized array (which would be an alternate
  solution to this problem).
  
  The above change is a win on machines with relatively slow sprintf
  functions.  Sprintf is not as fast as it once was, as ANSI C requires
  the format argument to be interpreted as a multi-byte string.
  
  The other change in this patch is to #ifdef out the code that creates
  CVSTLK files.  I, and others that I have shown the code to, can't
  think of any reason why it is needed.  Any errors that the code would
  report would have been cought by the set_lock() call that immediately
  follows.
  
  I #ifdef'd this out because there are neither comments nor a ChangeLog
  entry that explain why someone thought it's necessary; and because it
  slows down locking considerably, especially on NFS-mounted
  repositories.
  
  I've run a version of CVS without it for a few months without ill
  effect.
  
  Submitted by:	"J.T. Conklin" <jtc@cygnus.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503311802.KAA29357>