work_queue_internal.h
00001
00002
00003
00004
00005
00006
00007 #include "work_queue.h"
00008 #include "work_queue_resources.h"
00009
00010 #include "list.h"
00011
00012 struct work_queue_file {
00013 work_queue_file_t type;
00014 int flags;
00015 int length;
00016 off_t offset;
00017 off_t piece_length;
00018 char *payload;
00019 char *remote_name;
00020 char *cached_name;
00021 };
00022
00023 struct work_queue_task *work_queue_wait_internal(struct work_queue *q, int timeout, struct link *foreman_uplink, int *foreman_uplink_active);
00024
00025
00026 void aggregate_workers_resources( struct work_queue *q, struct work_queue_resources *r );
00027
00033 void work_queue_enable_process_module(struct work_queue *q);
00034
00039 int work_queue_submit_internal(struct work_queue *q, struct work_queue_task *t);
00040
00042 void work_queue_invalidate_cached_file_internal(struct work_queue *q, const char *filename);
00043
00044 void release_all_workers(struct work_queue *q);
00045
00046 void update_catalog(struct work_queue *q, struct link *foreman_uplink, int force_update );
00047
00049 void work_queue_broadcast_message(struct work_queue *q, const char *msg);