37 #include <sys/types.h>
73 else if (Request.
Prty < 0)Request.
Prty = 0;
78 rQueue[
static_cast<int>(Request.
Prty)]->Add(&Request);
106 int i, rc, numXfr, numPull;;
114 while(numPull && (rc = rQueue[i]->Get(&myReq)))
118 DEBUG(Persona <<
" from Q " << i <<
' ' <<numPull <<
" left");
139 if (!(*Req.
LFN))
return;
140 Pid = strtol(Req.
ID, &eP, 10);
141 if (*eP || Pid == 0)
return;
146 {
DEBUG(
"Instance=" <<Req.
iName <<
" cluster=" <<Req.
LFN <<
" pid=" <<Pid);}
147 else rQueue[qNum]->Del(&Req);
157 char buff[2048], *qPath;
167 {sprintf(buff,
"%s%sQ.%d", qPath, Persona, i);
169 if (!rQueue[i]->Init()) {free(qPath);
return 0;}
177 {sprintf(buff,
"create %s request thread", Persona);
197 if (PushIt) {rqMutex.
Lock();
198 if (!isPosted) {rqReady.Post(); isPosted = 1;}
201 else {rqReady.Wait();
202 rqMutex.
Lock(); isPosted = 0; rqMutex.
UnLock();
void * mainServerXeq(void *parg)
#define XRDSYSTHREAD_BIND
int Add(const char *iName, const char *cName, time_t addT, pid_t Pid)
static const int Register
static char * makeQDir(const char *Path, int Mode)
void Del(XrdFrcRequest &Request)
void Add(XrdFrcRequest &Request)
int Start(char *aPath, int aMode)
void Wakeup(int PushIt=1)
static int Add(XrdFrcRequest *rP, XrdFrcReqFile *reqF, int theQ)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
static int Run(pthread_t *, void *(*proc)(void *), void *arg, int opts=0, const char *desc=0)