2016-09-07 22:01:34 +02:00
|
|
|
/**
|
2016-09-11 22:20:15 +02:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-07 22:01:34 +02:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RESTORE_H
|
|
|
|
#define _RESTORE_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
2016-09-07 22:29:57 +02:00
|
|
|
#if defined (_POSIX)
|
2016-09-07 22:01:34 +02:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#endif // _POSIX
|
|
|
|
|
2016-09-07 22:29:57 +02:00
|
|
|
#if defined (_WIN)
|
2016-09-07 22:01:34 +02:00
|
|
|
#include <windows.h>
|
2016-09-07 22:04:04 +02:00
|
|
|
#include <psapi.h>
|
2016-09-07 22:01:34 +02:00
|
|
|
#endif // _WIN
|
|
|
|
|
|
|
|
#define RESTORE_VERSION_MIN 320
|
|
|
|
#define RESTORE_VERSION_CUR 320
|
|
|
|
|
2016-09-25 01:02:44 +02:00
|
|
|
u64 get_lowest_words_done (const restore_ctx_t *restore_ctx, const opencl_ctx_t *opencl_ctx);
|
2016-09-07 22:01:34 +02:00
|
|
|
|
2016-09-25 01:02:44 +02:00
|
|
|
void init_restore (restore_ctx_t *restore_ctx);
|
2016-09-07 22:01:34 +02:00
|
|
|
|
2016-09-25 01:02:44 +02:00
|
|
|
void read_restore (restore_ctx_t *restore_ctx);
|
2016-09-07 22:01:34 +02:00
|
|
|
|
2016-09-25 01:02:44 +02:00
|
|
|
void write_restore (restore_ctx_t *restore_ctx, opencl_ctx_t *opencl_ctx);
|
2016-09-07 22:01:34 +02:00
|
|
|
|
2016-09-25 01:02:44 +02:00
|
|
|
void cycle_restore (restore_ctx_t *restore_ctx, opencl_ctx_t *opencl_ctx);
|
2016-09-07 22:01:34 +02:00
|
|
|
|
2016-09-29 23:25:29 +02:00
|
|
|
void stop_at_checkpoint (restore_ctx_t *restore_ctx, status_ctx_t *status_ctx);
|
2016-09-25 01:02:44 +02:00
|
|
|
|
|
|
|
int restore_ctx_init (restore_ctx_t *restore_ctx, user_options_t *user_options, const folder_config_t *folder_config, int argc, char **argv);
|
|
|
|
|
|
|
|
void restore_ctx_destroy (restore_ctx_t *restore_ctx);
|
2016-09-14 16:07:24 +02:00
|
|
|
|
2016-09-07 22:01:34 +02:00
|
|
|
#endif // _RESTORE_H
|