backend/mmapings.h File Reference


Detailed Description

Manage the mmap objects of a file.

Definition in file mmapings.h.

#include "lib/mutex.h"
#include "lib/llist.h"
#include "backend/filedescriptor.h"
#include "backend/mmap.h"
#include "backend/file.h"
#include <nobug.h>

Include dependency graph for mmapings.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lumiera_mmapings_struct

Typedefs

typedef struct
lumiera_mmapings_struct 
lumiera_mmapings
typedef lumiera_mmapings * LumieraMMapings

Functions

void lumiera_mmapings_delete (LumieraMMapings self)
 destroy and free mmapings container and all its resources
LumieraMMapings lumiera_mmapings_destroy (LumieraMMapings self)
 destroy mmapings container and free all resources.
LumieraMMapings lumiera_mmapings_init (LumieraMMapings self, LumieraFile file, size_t chunksize)
 initialize mmapings container
LumieraMMap lumiera_mmapings_mmap_acquire (LumieraMMapings self, LumieraFile file, LList acquirer, off_t start, size_t size)
 acquire a mmap which covers the given range
LumieraMMapings lumiera_mmapings_new (LumieraFile file, size_t chunksize)
 allocate and initialize new mmapings container
void lumiera_mmapings_release_mmap (LumieraMMapings self, LList acquirer, LumieraMMap map)
 release a previously acquired MMap object
 NOBUG_DECLARE_FLAG (mmapings)


Function Documentation

LumieraMMapings lumiera_mmapings_init ( LumieraMMapings  self,
LumieraFile  file,
size_t  chunksize 
)

initialize mmapings container

Definition at line 37 of file mmapings.c.

References lumiera_mutex_init().

Referenced by lumiera_mmapings_new().

Here is the call graph for this function:

Here is the caller graph for this function:

LumieraMMapings lumiera_mmapings_destroy ( LumieraMMapings  self  ) 

destroy mmapings container and free all resources.

Definition at line 53 of file mmapings.c.

References LLIST_TO_STRUCTP, LLIST_WHILE_TAIL, and lumiera_mutex_destroy().

Referenced by lumiera_mmapings_delete().

Here is the call graph for this function:

Here is the caller graph for this function:

LumieraMMapings lumiera_mmapings_new ( LumieraFile  file,
size_t  chunksize 
)

allocate and initialize new mmapings container

Definition at line 72 of file mmapings.c.

References lumiera_mmapings_init().

Referenced by lumiera_file_chunksize_set().

Here is the call graph for this function:

Here is the caller graph for this function:

void lumiera_mmapings_delete ( LumieraMMapings  self  ) 

destroy and free mmapings container and all its resources

Definition at line 80 of file mmapings.c.

References lumiera_mmapings_destroy().

Referenced by lumiera_filedescriptor_delete().

Here is the call graph for this function:

Here is the caller graph for this function:

LumieraMMap lumiera_mmapings_mmap_acquire ( LumieraMMapings  self,
LumieraFile  file,
LList  acquirer,
off_t  start,
size_t  size 
)

acquire a mmap which covers the given range

Parameters:
self mmapings where to search
acquirer list node of the new owner which will registered in the mmap
start begin of the required range
size requested size
Returns:
MMap object covering the requested range or NULL on error

Definition at line 88 of file mmapings.c.

References lumiera_mmap_struct::cachenode, LLIST_FOREACH, LLIST_TO_STRUCTP, lumiera_mmapcache_checkout(), LUMIERA_MUTEX_SECTION, lumiera_mmap_struct::refcnt, lumiera_mmap_struct::searchnode, lumiera_mmap_struct::size, and lumiera_mmap_struct::start.

Here is the call graph for this function:

void lumiera_mmapings_release_mmap ( LumieraMMapings  self,
LList  acquirer,
LumieraMMap  map 
)

release a previously acquired MMap object

Parameters:
self mmapings to which the map belongs
acquirer holding node
map object to be released

Definition at line 138 of file mmapings.c.

References lumiera_mmap_struct::cachenode, lumiera_mmapcache_checkin(), and LUMIERA_MUTEX_SECTION.

Here is the call graph for this function:


Generated on Tue Jan 6 17:20:38 2009 for Lumiera by  doxygen 1.5.6