xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdFfs
XrdFfsQueue.hh
Go to the documentation of this file.
1
/******************************************************************************/
2
/* XrdFfsQueue.hh functions to run independent tasks in queue */
3
/* */
4
/* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University */
5
/* All Rights Reserved */
6
/* Author: Wei Yang (SLAC National Accelerator Laboratory, 2009) */
7
/* Contract DE-AC02-76-SFO0515 with the Department of Energy */
8
/******************************************************************************/
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
14
#include <stdlib.h>
15
#include <pthread.h>
16
17
struct
XrdFfsQueueTasks
{
18
pthread_mutex_t
mutex
;
19
pthread_cond_t
cond
;
20
short
done
;
21
void
* (*func)(
void
*);
22
void
**
args
;
23
24
unsigned
int
id
;
25
struct
XrdFfsQueueTasks
*
next
;
26
struct
XrdFfsQueueTasks
*
prev
;
27
};
28
29
struct
XrdFfsQueueTasks
*
XrdFfsQueue_create_task
(
void
* (*
func
)(
void
*),
void
**
args
,
short
initstat);
30
void
XrdFfsQueue_free_task
(
struct
XrdFfsQueueTasks
*task);
31
void
XrdFfsQueue_wait_task
(
struct
XrdFfsQueueTasks
*task);
32
unsigned
int
XrdFfsQueue_count_tasks
();
33
34
int
XrdFfsQueue_create_workers
(
int
n);
35
int
XrdFfsQueue_remove_workers
(
int
n);
36
int
XrdFfsQueue_count_workers
();
37
38
#ifdef __cplusplus
39
}
40
#endif
41
Generated by
1.8.1.2