"Fossies" - the Fresh Open Source Software Archive

Member "coda-6.9.5/coda-src/venus/binding.cc" (23 May 2003, 1251 Bytes) of package /linux/misc/old/coda-6.9.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "binding.cc" see the Fossies "Dox" file reference documentation.

    1 /* BLURB gpl
    2 
    3                            Coda File System
    4                               Release 6
    5 
    6           Copyright (c) 1987-2003 Carnegie Mellon University
    7                   Additional copyrights listed below
    8 
    9 This  code  is  distributed "AS IS" without warranty of any kind under
   10 the terms of the GNU General Public Licence Version 2, as shown in the
   11 file  LICENSE.  The  technical and financial  contributors to Coda are
   12 listed in the file CREDITS.
   13 
   14                         Additional copyrights
   15                            none currently
   16 
   17 #*/
   18 
   19 /* from venus */
   20 #include "binding.h"
   21 #include "venus.private.h"
   22 
   23 
   24 #ifdef VENUSDEBUG
   25 int binding::allocs = 0;
   26 int binding::deallocs = 0;
   27 #endif /* VENUSDEBUG */
   28 
   29 binding::binding() {
   30 
   31     binder = 0;
   32     bindee = 0;
   33     referenceCount = 0;
   34 
   35 #ifdef  VENUSDEBUG
   36     allocs++;
   37 #endif
   38 }
   39 
   40 binding::~binding() {
   41 #ifdef  VENUSDEBUG
   42     deallocs++;
   43 #endif
   44     if (referenceCount != 0)
   45       LOG(0, ("binding::~binding:  somebody forgot to decrement before delete\n"));
   46 
   47     if (binder != 0 || bindee != 0)
   48     { print(logFile); CHOKE("binding::~binding: something bogus");}
   49 }
   50 
   51 
   52 void binding::print(int fd) {
   53     fdprint(fd, "%p: binder = %p, bindee = %p, refCount = %d\n", this, binder, bindee, referenceCount);
   54 }