Lumiera  0.pre.03
»edityourfreedom«
filehandle.c File Reference

Go to the source code of this file.

Description

Implementation of filehandle representation.

Todo:
development in this area is stalled since 2010

Definition in file filehandle.c.

#include "include/logging.h"
#include "lib/llist.h"
#include "lib/safeclib.h"
#include "backend/file.h"
#include "backend/filehandle.h"
#include "backend/filedescriptor.h"
#include <unistd.h>

Functions

void * lumiera_filehandle_destroy_node (LList node)
 destroy the resources associated either a filehandle structure. More...
 
int lumiera_filehandle_handle (LumieraFilehandle self)
 
LumieraFilehandle lumiera_filehandle_init (LumieraFilehandle self, LumieraFiledescriptor desc)
 Initialise filehandle structure. More...
 
LumieraFilehandle lumiera_filehandle_new (LumieraFiledescriptor desc)
 Allocate a new filehandle structure. More...
 

Function Documentation

◆ lumiera_filehandle_init()

LumieraFilehandle lumiera_filehandle_init ( LumieraFilehandle  self,
LumieraFiledescriptor  descriptor 
)

Initialise filehandle structure.

Parameters
selffilehandle structure to be initialised
descriptoron which this filehandle will be attached
Returns
new filehandle structure

Definition at line 43 of file filehandle.c.

References TRACE().

Referenced by lumiera_filehandle_new(), and lumiera_filehandlecache_handle_acquire().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lumiera_filehandle_new()

LumieraFilehandle lumiera_filehandle_new ( LumieraFiledescriptor  descriptor)

Allocate a new filehandle structure.

Parameters
descriptoron which this filehandle will be attached
Returns
new filehandle structure

Definition at line 58 of file filehandle.c.

References lumiera_filehandle_init(), and lumiera_malloc().

Referenced by lumiera_filehandlecache_handle_acquire().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lumiera_filehandle_destroy_node()

void* lumiera_filehandle_destroy_node ( LList  node)

destroy the resources associated either a filehandle structure.

This function is used by the filehandle cache to recycle filehandle structs.

Parameters
nodepointer to the cache node member of a struct filehandle
Returns
pointer to the start of the memory of the destroyed filehandle

Definition at line 66 of file filehandle.c.

References TRACE().

Referenced by lumiera_filehandlecache_new().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lumiera_filehandle_handle()

int lumiera_filehandle_handle ( LumieraFilehandle  self)

Definition at line 81 of file filehandle.c.

References LUMIERA_ERROR_SET_CRITICAL, LUMIERA_FILE_MASK, lumiera_filedescriptor_flags(), lumiera_filedescriptor_name(), lumiera_filedescriptor_samestat(), and TRACE().

Referenced by lumiera_filedescriptor_delete(), and lumiera_filedescriptor_handle_acquire().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: