/* * Copyright (C) 2013 University of Chicago. * See COPYRIGHT notice in top-level directory. * */ #ifndef REBUILD_H #define REBUILD_H #include /* used to register a rebuild LP type and specify it's parameters */ void rebuild_init(char* set_eplica_selection, unsigned int set_failed_server_index, unsigned int set_recv_buffer_pool_size, unsigned int set_send_buffer_pool_size, unsigned int set_buffer_size, unsigned int set_num_servers); /* data produced by the rebuild procedure that will be returned to the * calling LP on completion */ struct rebuild_output { /* TODO: this is just a test case; put real parameters in here */ unsigned long objects_rebuilt; }; /* Initiate a rebuild procedure. The rebuild LP will send a "callback" event * to the calling LP when it completes. The callback event is specified by * the caller and is opaque to the rebuild LP with one exception: the rebuild * LP is allowed to modify a "rebuild_output" struct embedded in the event * in order to convey information back to the caller. * * lp: lp structure of caller * gid: lp id of the rebuild LP * cb_event: event structure to be transmitted back to the caller on * completion * cb_event_size: size of cb_event * cb_output_offset: specifies the offset of a rebuild_output struct within * cb_event. This will be filled in with output data before the event is * transmitted back to the caller. */ void rebuild_start(tw_lp *lp, tw_lpid gid, void* cb_event, int cb_event_size, int cb_output_offset); void rebuild_start_reverse(tw_lp *lp); #endif /* REBUILD_H */ /* * Local variables: * c-indent-level: 4 * c-basic-offset: 4 * End: * * vim: ft=c ts=8 sts=4 sw=4 expandtab */