Serial implementation of snapshot functions for use on Linux/Mac. More...
#include <cstdio>#include <cassert>#include <cfloat>#include <climits>#include <cstdlib>#include <iostream>#include <stdint.h>#include <sys/types.h>#include <sys/stat.h>Go to the source code of this file.
Defines | |
| #define | LUC_ERR_OK 1 |
| #define | SNAP_ERR_OK 1 |
| #define | LUC_ERR_TIMEOUT -13 |
| #define | SNAP_ERR_BAD_PARAMETER 2 |
| #define | SNAP_ERR_OPEN_FAILED 3 |
| #define | SNAP_ERR_READ_FAILED 4 |
| #define | SNAP_ERR_RESOURCE_FAILURE 5 |
| #define | SNAP_ERR_RESTORE_FAILED 6 |
| #define | SNAP_ERR_SNAPSHOT_FAILED 7 |
| #define | SNAP_ERR_WRITE_FAILED 8 |
Typedefs | |
| typedef int | luc_error_t |
| typedef uint64_t | luc_endpoint_id_t |
| typedef struct stat | snap_stat_buf |
Functions | |
| luc_error_t | mtgl::snap_init () |
| Initializes the snapshot system; we don't have to do anything. | |
| luc_error_t | mtgl::snap_snapshot (char fname[], void *buf, size_t count, int64_t *err) |
| Writes contents of buffer buf to file fname. | |
| luc_error_t | mtgl::snap_restore (char fname[], void *buf, size_t count, int64_t *err) |
| Reads contents of file fname into buffer buf. | |
| luc_error_t | mtgl::snap_pwrite (char fname[], luc_endpoint_id_t swEP, const void *buf, size_t count, off_t offset, int64_t *err) |
| Stub not yet implemented since it is not yet used in MTGL. | |
| luc_error_t | mtgl::snap_pread (char fname[], luc_endpoint_id_t swEP, void *buf, size_t count, off_t offset, int64_t *err) |
| Stub not yet implemented since it is not yet used in MTGL. | |
| luc_error_t | mtgl::snap_stat (char fname[], luc_endpoint_id_t swEP, snap_stat_buf *statBuf, int64_t *err) |
| Returns info about a file. | |
Serial implementation of snapshot functions for use on Linux/Mac.
1.7.1