cctools
work_queue_internal.h
1 /*
2 Copyright (C) 2008- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #include "work_queue.h"
8 #include "work_queue_resources.h"
9 
10 #include "list.h"
11 
13  work_queue_file_t type;
14  int flags; // WORK_QUEUE_CACHE or others in the future.
15  int length; // length of payload, only used for non-file objects like buffers and urls
16  off_t offset; // file offset for WORK_QUEUE_FILE_PIECE
17  off_t piece_length; // file piece length for WORK_QUEUE_FILE_PIECE
18  char *payload; // name on master machine or buffer of data.
19  char *remote_name; // name on remote machine.
20  char *cached_name; // name on remote machine in cached directory.
21 };
22 
23 struct work_queue_task *work_queue_wait_internal(struct work_queue *q, int timeout, struct link *foreman_uplink, int *foreman_uplink_active);
24 
25 /* Adds (arithmetically) all the workers resources (cores, memory, disk) */
26 void aggregate_workers_resources( struct work_queue *q, struct work_queue_resources *r );
27 
33 void work_queue_enable_process_module(struct work_queue *q);
34 
39 int work_queue_submit_internal(struct work_queue *q, struct work_queue_task *t);
40 
42 void work_queue_invalidate_cached_file_internal(struct work_queue *q, const char *filename);
43 
44 void release_all_workers(struct work_queue *q);
45 
46 void update_catalog(struct work_queue *q, struct link *foreman_uplink, int force_update );
47 
49 void work_queue_broadcast_message(struct work_queue *q, const char *msg);
50 
51 /* shortcut to set cores, memory, disk, etc. from a single function. */
52 void work_queue_task_specify_resources(struct work_queue_task *t, struct rmsummary *rm);
A task description.
Definition: work_queue.h:102
A master-worker library.
Double-linked non-intrusive list.
Definition: work_queue_internal.h:12
Definition: rmsummary.h:25
Definition: work_queue_resources.h:20
work_queue_file_t
Definition: work_queue.h:83