work_queue_internal.h

00001 /*
00002 Copyright (C) 2008- The University of Notre Dame
00003 This software is distributed under the GNU General Public License.
00004 See the file COPYING for details.
00005 */
00006 
00007 #include "work_queue.h"
00008 #include "work_queue_resources.h"
00009 
00010 #include "list.h"
00011 #include "hash_table.h"
00012 
00013 struct work_queue_file {
00014         work_queue_file_t type;
00015         int flags;              // WORK_QUEUE_CACHE or others in the future.
00016         int length;             // length of payload, only used for non-file objects like buffers and urls
00017         off_t offset;           // file offset for WORK_QUEUE_FILE_PIECE
00018         off_t piece_length;     // file piece length for WORK_QUEUE_FILE_PIECE
00019         char *payload;          // name on master machine or buffer of data.
00020         char *remote_name;      // name on remote machine.
00021         char *cached_name;      // name on remote machine in cached directory.
00022 };
00023 
00024 struct work_queue_task *work_queue_wait_internal(struct work_queue *q, int timeout, struct link *foreman_uplink, int *foreman_uplink_active);
00025 
00026 /* Adds (arithmetically) all the workers resources (cores, memory, disk) */
00027 void aggregate_workers_resources( struct work_queue *q, struct work_queue_resources *r, struct hash_table *categories );
00028 
00034 void work_queue_enable_process_module(struct work_queue *q);
00035 
00040 int work_queue_submit_internal(struct work_queue *q, struct work_queue_task *t);
00041 
00043 void work_queue_invalidate_cached_file_internal(struct work_queue *q, const char *filename);
00044 
00045 void release_all_workers(struct work_queue *q);
00046 
00047 void update_catalog(struct work_queue *q, struct link *foreman_uplink, int force_update );
00048 
00050 void work_queue_broadcast_message(struct work_queue *q, const char *msg);
00051 
00052 /* shortcut to set cores, memory, disk, etc. from a single function. */
00053 void work_queue_task_specify_resources(struct work_queue_task *t, const struct rmsummary *rm);
00054 

Generated on 17 Sep 2019 for cctools by  doxygen 1.6.1