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 
00012 typedef enum {
00013         WORK_QUEUE_FILE = 1,
00014         WORK_QUEUE_BUFFER,
00015         WORK_QUEUE_REMOTECMD,
00016         WORK_QUEUE_FILE_PIECE,
00017         WORK_QUEUE_DIRECTORY,
00018         WORK_QUEUE_URL
00019 } work_queue_file_t;
00020 
00021 struct work_queue_file {
00022         work_queue_file_t type;
00023         int flags;              // WORK_QUEUE_CACHE or others in the future.
00024         int length;             // length of payload, only used for non-file objects like buffers and urls
00025         off_t offset;           // file offset for WORK_QUEUE_FILE_PIECE
00026         off_t piece_length;     // file piece length for WORK_QUEUE_FILE_PIECE
00027         char *payload;          // name on master machine or buffer of data.
00028         char *remote_name;      // name on remote machine.
00029         char *cached_name;      // name on remote machine in cached directory.
00030 };
00031 
00032 struct work_queue_task *work_queue_wait_internal(struct work_queue *q, int timeout, struct link *foreman_uplink, int *foreman_uplink_active);
00033 
00034 /* Adds (arithmetically) all the workers resources (cores, memory, disk) */
00035 void aggregate_workers_resources( struct work_queue *q, struct work_queue_resources *r );
00036 
00042 void work_queue_enable_process_module(struct work_queue *q);
00043 
00048 int work_queue_submit_internal(struct work_queue *q, struct work_queue_task *t);
00049 
00050 void release_all_workers(struct work_queue *q);
00051 
00052 void update_catalog(struct work_queue *q, struct link *foreman_uplink, int force_update );

Generated on 17 Feb 2015 for cctools by  doxygen 1.4.7