Skip to content

Commit

Permalink
Corectly spell guard!
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Apr 8, 2016
1 parent 748fb3b commit c5ffa70
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/XrdPosix.cmake
Expand Up @@ -23,7 +23,7 @@ add_library(
XrdPosix/XrdPosixFileRH.cc XrdPosix/XrdPosixFileRH.hh
XrdPosix/XrdPosixMap.cc XrdPosix/XrdPosixMap.hh
XrdPosix/XrdPosixObject.cc XrdPosix/XrdPosixObject.hh
XrdPosix/XrdPosixObjGaurd.hh
XrdPosix/XrdPosixObjGuard.hh
XrdPosix/XrdPosixPrepIO.cc XrdPosix/XrdPosixPrepIO.hh
XrdPosix/XrdPosixXrootd.cc XrdPosix/XrdPosixXrootd.hh
XrdPosix/XrdPosixXrootdPath.cc XrdPosix/XrdPosixXrootdPath.hh
Expand Down
@@ -1,8 +1,8 @@
#ifndef __XRDPOSIXOBJGAURD_HH__
#define __XRDPOSIXOBJGAURD_HH__
#ifndef __XRDPOSIXOBJGUARD_HH__
#define __XRDPOSIXOBJGUARD_HH__
/******************************************************************************/
/* */
/* X r d P o s i x O b j G a u r d . h h */
/* X r d P o s i x O b j G u a r d . h h */
/* */
/* (c) 2016 by the Board of Trustees of the Leland Stanford, Jr., University */
/* All Rights Reserved */
Expand Down Expand Up @@ -32,22 +32,22 @@

#include "XrdPosix/XrdPosixFile.hh"

class XrdPosixObjGaurd
class XrdPosixObjGuard
{
public:

void Init(XrdPosixFile *fP)
{if (gaurdP) gaurdP->updUnLock();
gaurdP = fP;
gaurdP->updLock();
{if (guardP) guardP->updUnLock();
guardP = fP;
guardP->updLock();
}

void Release() {if (gaurdP) {gaurdP->updUnLock(); gaurdP = 0;}}
void Release() {if (guardP) {guardP->updUnLock(); guardP = 0;}}

XrdPosixObjGaurd(XrdPosixFile *fP): gaurdP(0) {Init(fP);}
~XrdPosixObjGaurd() {Release();}
XrdPosixObjGuard(XrdPosixFile *fP): guardP(0) {Init(fP);}
~XrdPosixObjGuard() {Release();}

private:
XrdPosixFile *gaurdP;
XrdPosixFile *guardP;
};
#endif
4 changes: 2 additions & 2 deletions src/XrdPosix/XrdPosixPrepIO.cc
Expand Up @@ -31,7 +31,7 @@
#include <iostream>
#include <stdio.h>

#include "XrdPosix/XrdPosixObjGaurd.hh"
#include "XrdPosix/XrdPosixObjGuard.hh"
#include "XrdPosix/XrdPosixPrepIO.hh"

/******************************************************************************/
Expand All @@ -49,7 +49,7 @@ extern bool psxDBG;

bool XrdPosixPrepIO::Init(XrdOucCacheIOCB *iocbP)
{
XrdPosixObjGaurd objGaurd(fileP);
XrdPosixObjGuard objGuard(fileP);
XrdCl::XRootDStatus Status;
static int maxCalls = 64;

Expand Down

0 comments on commit c5ffa70

Please sign in to comment.