#include <XrdSysPthread.hh>
Definition at line 493 of file XrdSysPthread.hh.
◆ XrdSysSemaphore()
XrdSysSemaphore::XrdSysSemaphore |
( |
int | semval = 1, |
|
|
const char * | = 0 ) |
|
inline |
Definition at line 515 of file XrdSysPthread.hh.
516 {if (sem_init(&h_semaphore, 0, semval))
517 {throw "sem_init() failed";}
518 }
◆ ~XrdSysSemaphore()
XrdSysSemaphore::~XrdSysSemaphore |
( |
| ) |
|
|
inline |
Definition at line 519 of file XrdSysPthread.hh.
519 {if (sem_destroy(&h_semaphore))
520 {abort();}
521 }
◆ CondWait()
int XrdSysSemaphore::CondWait |
( |
| ) |
|
|
inline |
Definition at line 497 of file XrdSysPthread.hh.
498 {while(sem_trywait( &h_semaphore ))
499 {if (errno == EAGAIN) return 0;
500 if (errno != EINTR) { throw "sem_CondWait() failed";}
501 }
502 return 1;
503 }
◆ Post()
void XrdSysSemaphore::Post |
( |
| ) |
|
|
inline |
Definition at line 505 of file XrdSysPthread.hh.
505 {if (sem_post(&h_semaphore))
506 {throw "sem_post() failed";}
507 }
Referenced by XrdRmcReal::~XrdRmcReal(), XrdInet::Accept(), XrdSys::IOEvents::PollE::Begin(), XrdSys::IOEvents::PollKQ::Begin(), XrdSys::IOEvents::PollPoll::Begin(), XrdSys::IOEvents::PollPort::Begin(), XrdCmsAdmin::Relay(), XrdPollE::Start(), XrdPollPoll::Start(), XrdFrmConfigMum(), and XrdSysLoggerRT().
◆ Wait()
void XrdSysSemaphore::Wait |
( |
| ) |
|
|
inline |
Definition at line 509 of file XrdSysPthread.hh.
509 {while (sem_wait(&h_semaphore))
510 {if (EINTR != errno)
511 {throw "sem_wait() failed";}
512 }
513 }
Referenced by XrdRmcReal::~XrdRmcReal(), XrdSysLogger::Bind(), XrdFrmConfig::Configure(), XrdSys::IOEvents::Poller::Create(), XrdSys::IOEvents::Channel::Delete(), XrdRmcData::Detach(), XrdPollPoll::Disable(), XrdCmsConfig::DoIt(), XrdPollPoll::Exclude(), XrdCl::ExecuteActions(), XrdSsiFileReq::Finalize(), XrdSsiTaskReal::Kill(), mainAccept(), XrdCmsAdmin::Relay(), XrdCl::CopyProcess::Run(), XrdSys::IOEvents::Poller::SendCmd(), XrdXrootdFile::Serialize(), and XrdFrmXfrQueue::StopMon().
The documentation for this class was generated from the following file: