leveldb
Namespaces | Classes | Functions
leveldb::anonymous_namespace{env_posix.cc} Namespace Reference

Namespaces

 anonymous_namespace{env_posix.cc}
 

Classes

class  MmapLimiter
 
class  PosixEnv
 
class  PosixFileLock
 
class  PosixLockTable
 
class  PosixMmapReadableFile
 
class  PosixRandomAccessFile
 
class  PosixSequentialFile
 
class  PosixWritableFile
 

Functions

static Status IOError (const std::string &context, int err_number)
 
static int LockOrUnlock (int fd, bool lock)
 
static void * StartThreadWrapper (void *arg)
 

Function Documentation

§ IOError()

static Status leveldb::anonymous_namespace{env_posix.cc}::IOError ( const std::string &  context,
int  err_number 
)
static

Definition at line 31 of file env_posix.cc.

31  {
32  return Status::IOError(context, strerror(err_number));
33 }
static Status IOError(const std::string &context, int err_number)
Definition: env_posix.cc:31
Here is the call graph for this function:
Here is the caller graph for this function:

§ LockOrUnlock()

static int leveldb::anonymous_namespace{env_posix.cc}::LockOrUnlock ( int  fd,
bool  lock 
)
static

Definition at line 256 of file env_posix.cc.

256  {
257  errno = 0;
258  struct flock f;
259  memset(&f, 0, sizeof(f));
260  f.l_type = (lock ? F_WRLCK : F_UNLCK);
261  f.l_whence = SEEK_SET;
262  f.l_start = 0;
263  f.l_len = 0; // Lock/unlock entire file
264  return fcntl(fd, F_SETLK, &f);
265 }
Here is the caller graph for this function:

§ StartThreadWrapper()

static void* leveldb::anonymous_namespace{env_posix.cc}::StartThreadWrapper ( void *  arg)
static

Definition at line 591 of file env_posix.cc.

591  {
592  StartThreadState* state = reinterpret_cast<StartThreadState*>(arg);
593  state->user_function(state->arg);
594  delete state;
595  return NULL;
596 }
Here is the caller graph for this function: