Atlas Runtime
atlas_api.h File Reference
#include <stdlib.h>
#include <stdint.h>
Include dependency graph for atlas_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NVM_BEGIN_DURABLE()   nvm_begin_durable()
 
#define NVM_END_DURABLE()   nvm_end_durable()
 
#define NVM_CLFLUSH(p)   nvm_clflush((char*)(void*)(p))
 
#define NVM_FLUSH(p)
 
#define NVM_FLUSH_COND(p)
 
#define NVM_FLUSH_ACQ(p)
 
#define NVM_FLUSH_ACQ_COND(p)
 
#define NVM_PSYNC(p1, s)   nvm_psync(p1,s)
 
#define NVM_PSYNC_COND(p1, s)   { if (NVM_IsInOpenPR(p1, s)) nvm_psync(p1,s); }
 
#define NVM_PSYNC_ACQ(p1, s)
 
#define NVM_PSYNC_ACQ_COND(p1, s)
 

Functions

void NVM_Initialize ()
 
void NVM_Finalize ()
 
void nvm_begin_durable ()
 
void nvm_end_durable ()
 
int NVM_IsInOpenPR (void *addr, size_t sz)
 
void nvm_psync (void *addr, size_t sz)
 
void nvm_psync_acq (void *addr, size_t sz)
 

Macro Definition Documentation

#define NVM_BEGIN_DURABLE ( )    nvm_begin_durable()
#define NVM_CLFLUSH (   p)    nvm_clflush((char*)(void*)(p))
#define NVM_END_DURABLE ( )    nvm_end_durable()
#define NVM_FLUSH (   p)
Value:
{ full_fence(); \
NVM_CLFLUSH((p)); \
full_fence(); \
}
#define NVM_CLFLUSH(p)
Definition: atlas_api.h:103
#define NVM_FLUSH_ACQ (   p)
Value:
{ full_fence(); \
}
#define NVM_CLFLUSH(p)
Definition: atlas_api.h:103
#define NVM_FLUSH_ACQ_COND (   p)
Value:
{ if (NVM_IsInOpenPR(p, 1)) { \
full_fence(); \
} \
}
#define NVM_CLFLUSH(p)
Definition: atlas_api.h:103
int NVM_IsInOpenPR(void *addr, size_t sz)
Definition: pregion_mgr_api.cpp:90
#define NVM_FLUSH_COND (   p)
Value:
{ if (NVM_IsInOpenPR(p, 1)) { \
full_fence(); \
NVM_CLFLUSH((p)); \
full_fence(); \
} \
}
#define NVM_CLFLUSH(p)
Definition: atlas_api.h:103
int NVM_IsInOpenPR(void *addr, size_t sz)
Definition: pregion_mgr_api.cpp:90
#define NVM_PSYNC (   p1,
 
)    nvm_psync(p1,s)
#define NVM_PSYNC_ACQ (   p1,
 
)
Value:
{ \
} \
void nvm_psync_acq(void *addr, size_t sz)
Definition: log_mgr_api.cpp:162
#define NVM_PSYNC_ACQ_COND (   p1,
 
)
Value:
{ \
if (NVM_IsInOpenPR(p1, s)) nvm_psync_acq(p1, s); \
} \
int NVM_IsInOpenPR(void *addr, size_t sz)
Definition: pregion_mgr_api.cpp:90
void nvm_psync_acq(void *addr, size_t sz)
Definition: log_mgr_api.cpp:162
#define NVM_PSYNC_COND (   p1,
 
)    { if (NVM_IsInOpenPR(p1, s)) nvm_psync(p1,s); }

Function Documentation

void nvm_begin_durable ( )

The following 2 interfaces demarcate a failure-atomic section of code, i.e. code where persistent locations are updated and all-or-nothing behavior of those updates is required. Note that no isolation among threads is provided by these 2 interfaces.

void nvm_end_durable ( )
void NVM_Finalize ( )

Finalize Atlas internal data structures. This should be called before normal program exit. If not called, the implementation will assume that program exit was abnormal and will require invocation of recovery before restart.

void NVM_Initialize ( )

Initialize Atlas internal data structures. This should be called before persistent memory access.

int NVM_IsInOpenPR ( void *  addr,
size_t  sz 
)

Is the following address with associated size within an open persistent region?

void nvm_psync ( void *  addr,
size_t  sz 
)

Persistent sync of a range of addresses

void nvm_psync_acq ( void *  addr,
size_t  sz 
)

Persistent sync of a range of addresses without a trailing barrier