Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XrdCl] Remove more ugly hack #1453

Merged
merged 1 commit into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions packaging/rhel/xrootd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
#-------------------------------------------------------------------------------
%if %{?rhel:1}%{!?rhel:0}
# starting with rhel 7 we have systemd and macaroons,
# also glibc semaphores are fixed
%if %{rhel} >= 7
%define use_systemd 1
%define have_macaroons 1
%define use_libc_semaphore 1

%if %{rhel} == 7
# we build both python2 and python3 bindings for EPEL7
Expand All @@ -20,15 +17,6 @@
%define python3only 1
%define python2and3 0
%endif
%else
%define use_systemd 0
%define have_macaroons 0
%define use_libc_semaphore 0
# we only build python2 bindings for EPEL<=6
%define python2only 1
%define python3only 0
%define python2and3 0
%endif
%else
# do we have macaroons ?
%if %{?fedora}%{!?fedora:0} >= 28
Expand All @@ -42,12 +30,6 @@
%else
%define use_systemd 0
%endif
# can we use glibc semaphores ?
%if %{?fedora}%{!?fedora:0} >= 22
%define use_libc_semaphore 1
%else
%define use_libc_semaphore 0
%endif
# we only build python3 bindings for fedora
%define python2only 0
%define python3only 1
Expand Down Expand Up @@ -609,7 +591,7 @@ cmake \
%if %{?_with_xrdclhttp:1}%{!?_with_xrdclhttp:0}
-DXRDCLHTTP_SUBMODULE=TRUE \
%endif
-DUSE_LIBC_SEMAPHORE=%{use_libc_semaphore} ../
../

make -i VERBOSE=1 %{?_smp_mflags}
popd
Expand Down
1 change: 0 additions & 1 deletion src/XrdCl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ add_library(
XrdClJobManager.cc XrdClJobManager.hh
XrdClResponseJob.hh
XrdClFileTimer.cc XrdClFileTimer.hh
XrdClUglyHacks.hh
XrdClPlugInInterface.hh
XrdClPlugInManager.cc XrdClPlugInManager.hh
XrdClPropertyList.hh
Expand Down
4 changes: 2 additions & 2 deletions src/XrdCl/XrdClChannel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace
FilterHandler(const FilterHandler &other);
FilterHandler &operator = (const FilterHandler &other);

XrdSysSemaphore *pSem;
XrdSysSemaphore *pSem;
XrdCl::MessageFilter *pFilter;
XrdCl::Message *pMsg;
XrdCl::XRootDStatus pStatus;
Expand Down Expand Up @@ -179,7 +179,7 @@ namespace
StatusHandler(const StatusHandler &other);
StatusHandler &operator = (const StatusHandler &other);

XrdSysSemaphore *pSem;
XrdSysSemaphore *pSem;
XrdCl::XRootDStatus pStatus;
XrdCl::Message *pMsg;
};
Expand Down
1 change: 1 addition & 0 deletions src/XrdCl/XrdClCheckSumManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "XrdCks/XrdCksCalccrc32.hh"
#include "XrdCks/XrdCksCalcadler32.hh"
#include "XrdSys/XrdSysE2T.hh"
#include "XrdSys/XrdSysPthread.hh"
#include "XrdVersion.hh"

#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions src/XrdCl/XrdClClassicCopyJob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "XrdCl/XrdClXRootDTransport.hh"
#include "XrdClXCpCtx.hh"
#include "XrdSys/XrdSysE2T.hh"
#include "XrdSys/XrdSysPthread.hh"

#include <memory>
#include <mutex>
Expand Down
5 changes: 3 additions & 2 deletions src/XrdCl/XrdClCopyProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "XrdCl/XrdClJobManager.hh"
#include "XrdCl/XrdClRedirectorRegistry.hh"
#include "XrdCl/XrdClConstants.hh"
#include "XrdSys/XrdSysPthread.hh"

#include <sys/time.h>

Expand All @@ -50,7 +51,7 @@ namespace
XrdCl::CopyProgressHandler *progress,
uint16_t currentJob,
uint16_t totalJobs,
XrdSysSemaphore *sem = 0 ):
XrdSysSemaphore *sem = 0 ):
pJob(job), pProgress(progress), pCurrentJob(currentJob),
pTotalJobs(totalJobs), pSem(sem),
pRetryCnt( XrdCl::DefaultRetryWrtAtLBLimit )
Expand Down Expand Up @@ -162,7 +163,7 @@ namespace
XrdCl::CopyProgressHandler *pProgress;
uint16_t pCurrentJob;
uint16_t pTotalJobs;
XrdSysSemaphore *pSem;
XrdSysSemaphore *pSem;
int pRetryCnt;
};
};
Expand Down
3 changes: 2 additions & 1 deletion src/XrdCl/XrdClFileStateHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@

#include "XrdOuc/XrdOucCRC.hh"

#include "XrdSys/XrdSysPageSize.hh"
#include "XrdSys/XrdSysKernelBuffer.hh"
#include "XrdSys/XrdSysPageSize.hh"
#include "XrdSys/XrdSysPthread.hh"

#include <sstream>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion src/XrdCl/XrdClSyncQueue.hh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace XrdCl
protected:
std::queue<Item> pQueue;
XrdSysMutex pMutex;
XrdSysSemaphore *pSem;
XrdSysSemaphore *pSem;
};
}

Expand Down
3 changes: 2 additions & 1 deletion src/XrdCl/XrdClThirdPartyCopyJob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "XrdCl/XrdClRedirectorRegistry.hh"
#include "XrdCl/XrdClDlgEnv.hh"
#include "XrdOuc/XrdOucTPC.hh"
#include "XrdSys/XrdSysPthread.hh"
#include "XrdSys/XrdSysTimer.hh"

#include <iostream>
Expand Down Expand Up @@ -700,7 +701,7 @@ namespace XrdCl
// Do the copy and follow progress
//--------------------------------------------------------------------------
TPCStatusHandler statusHandler;
XrdSysSemaphore *sem = statusHandler.GetXrdSysSemaphore();
XrdSysSemaphore *sem = statusHandler.GetXrdSysSemaphore();
StatInfo *info = 0;

uint16_t tpcTimeout = 0;
Expand Down
1 change: 1 addition & 0 deletions src/XrdCl/XrdClXRootDMsgHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include "XrdSys/XrdSysPlatform.hh" // same as above
#include "XrdSys/XrdSysAtomics.hh"
#include "XrdSys/XrdSysPthread.hh"
#include <memory>
#include <sstream>
#include <numeric>
Expand Down
1 change: 0 additions & 1 deletion src/XrdHeaders.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ set( XROOTD_PUBLIC_HEADERS
XrdSys/XrdSysError.hh
XrdSys/XrdSysFD.hh
XrdSys/XrdSysHeaders.hh
XrdSys/XrdSysLinuxSemaphore.hh
XrdSys/XrdSysLogger.hh
XrdSys/XrdSysLogPI.hh
XrdSys/XrdSysPageSize.hh
Expand Down