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 #include "hash_table.h"
12 
14  work_queue_file_t type;
15  int flags; // WORK_QUEUE_CACHE or others in the future.
16  int length; // length of payload, only used for non-file objects like buffers and urls
17  off_t offset; // file offset for WORK_QUEUE_FILE_PIECE
18  off_t piece_length; // file piece length for WORK_QUEUE_FILE_PIECE
19  char *payload; // name on master machine or buffer of data.
20  char *remote_name; // name on remote machine.
21  char *cached_name; // name on remote machine in cached directory.
22 };
23 
24 struct work_queue_task *work_queue_wait_internal(struct work_queue *q, int timeout, struct link *foreman_uplink, int *foreman_uplink_active);
25 
26 /* Adds (arithmetically) all the workers resources (cores, memory, disk) */
27 void aggregate_workers_resources( struct work_queue *q, struct work_queue_resources *r, struct hash_table *categories );
28 
34 void work_queue_enable_process_module(struct work_queue *q);
35 
40 int work_queue_submit_internal(struct work_queue *q, struct work_queue_task *t);
41 
43 void work_queue_invalidate_cached_file_internal(struct work_queue *q, const char *filename);
44 
45 void release_all_workers(struct work_queue *q);
46 
47 void update_catalog(struct work_queue *q, struct link *foreman_uplink, int force_update );
48 
50 void work_queue_broadcast_message(struct work_queue *q, const char *msg);
51 
52 /* shortcut to set cores, memory, disk, etc. from a single function. */
53 void work_queue_task_specify_resources(struct work_queue_task *t, const struct rmsummary *rm);
54 
A task description.
Definition: work_queue.h:126
A manager-worker library.
Robust, reentrant linked list structure.
Definition: work_queue_internal.h:13
Definition: rmsummary.h:26
Definition: work_queue_resources.h:20
A general purpose hash table.
work_queue_file_t
Definition: work_queue.h:87