RTEMS CPU Kit with SuperCore  4.11.99.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
libio_.h File Reference

LibIO Internal Interface. More...

#include <sys/uio.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/seterr.h>
#include <rtems/userenv.h>
Include dependency graph for libio_.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rtems_filesystem_eval_path_generic_config
 

Macros

#define RTEMS_FILESYSTEM_SYMLOOP_MAX   32
 
#define F_DUP2FD   20
 
#define RTEMS_LIBIO_SEM   rtems_build_name('L', 'B', 'I', 'O')
 
#define RTEMS_LIBIO_IOP_SEM(n)   rtems_build_name('L', 'B', 'I', n)
 
#define rtems_libio_iop(_fd)
 
#define rtems_libio_iop_to_descriptor(_iop)   ((_iop) - &rtems_libio_iops[0])
 
#define rtems_libio_check_is_open(_iop)
 
#define rtems_libio_check_fd(_fd)
 
#define rtems_libio_check_buffer(_buffer)
 
#define rtems_libio_check_count(_count)
 
#define rtems_libio_check_permissions_with_error(_iop, _flag, _errno)
 
#define rtems_libio_check_permissions(_iop, _flag)   rtems_libio_check_permissions_with_error(_iop, _flag, EINVAL )
 
#define rtems_filesystem_mt_entry_declare_lock_context(ctx)   rtems_interrupt_lock_context ctx
 
#define rtems_filesystem_mt_entry_lock(ctx)   rtems_interrupt_lock_acquire( &rtems_filesystem_mt_entry_lock_control, &ctx )
 
#define rtems_filesystem_mt_entry_unlock(ctx)   rtems_interrupt_lock_release( &rtems_filesystem_mt_entry_lock_control, &ctx )
 

Typedefs

typedef bool(* rtems_filesystem_eval_path_is_directory) (rtems_filesystem_eval_path_context_t *ctx, void *arg)
 Tests if the current location is a directory. More...
 
typedef rtems_filesystem_eval_path_generic_status(* rtems_filesystem_eval_path_eval_token) (rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen)
 Evaluates a token. More...
 

Enumerations

enum  rtems_filesystem_eval_path_generic_status { RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE, RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE, RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY }
 

Functions

void rtems_filesystem_location_clone (rtems_filesystem_location_info_t *clone, const rtems_filesystem_location_info_t *master)
 Clones a node. More...
 
void rtems_filesystem_location_free (rtems_filesystem_location_info_t *loc)
 Releases all resources of a location. More...
 
void rtems_libio_free_user_env (void *env)
 
rtems_libio_trtems_libio_allocate (void)
 This routine searches the IOP Table for an unused entry. More...
 
uint32_t rtems_libio_fcntl_flags (int fcntl_flags)
 Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand.
 
int rtems_libio_to_fcntl_flags (uint32_t flags)
 Convert RTEMS internal flags to UNIX fnctl(2) flags.
 
void rtems_libio_free (rtems_libio_t *iop)
 This routine frees the resources associated with an IOP (file descriptor) and clears the slot in the IOP Table.
 
rtems_filesystem_location_info_trtems_filesystem_eval_path_start (rtems_filesystem_eval_path_context_t *ctx, const char *path, int eval_flags)
 
rtems_filesystem_location_info_trtems_filesystem_eval_path_start_with_parent (rtems_filesystem_eval_path_context_t *ctx, const char *path, int eval_flags, rtems_filesystem_location_info_t *parentloc, int parent_eval_flags)
 
rtems_filesystem_location_info_trtems_filesystem_eval_path_start_with_root_and_current (rtems_filesystem_eval_path_context_t *ctx, const char *path, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr)
 
void rtems_filesystem_eval_path_continue (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_cleanup (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_recursive (rtems_filesystem_eval_path_context_t *ctx, const char *path, size_t pathlen)
 
void rtems_filesystem_eval_path_cleanup_with_parent (rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *parentloc)
 
void rtems_filesystem_eval_path_restart (rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_global_location_t **newstartloc_ptr)
 Requests a path evaluation restart. More...
 
void rtems_filesystem_eval_path_generic (rtems_filesystem_eval_path_context_t *ctx, void *arg, const rtems_filesystem_eval_path_generic_config *config)
 
void rtems_filesystem_initialize (void)
 
rtems_filesystem_location_info_trtems_filesystem_location_copy (rtems_filesystem_location_info_t *dst, const rtems_filesystem_location_info_t *src)
 Copies a location. More...
 
rtems_filesystem_global_location_trtems_filesystem_location_transform_to_global (rtems_filesystem_location_info_t *loc)
 
void rtems_filesystem_global_location_assign (rtems_filesystem_global_location_t **lhs_global_loc_ptr, rtems_filesystem_global_location_t *rhs_global_loc)
 Assigns a global file system location. More...
 
rtems_filesystem_global_location_trtems_filesystem_global_location_obtain (rtems_filesystem_global_location_t *const *global_loc_ptr)
 Obtains a global file system location. More...
 
void rtems_filesystem_global_location_release (rtems_filesystem_global_location_t *global_loc)
 Releases a global file system location. More...
 
void rtems_filesystem_location_detach (rtems_filesystem_location_info_t *detach)
 
void rtems_filesystem_location_copy_and_detach (rtems_filesystem_location_info_t *copy, rtems_filesystem_location_info_t *detach)
 
int rtems_filesystem_mknod (const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, mode_t mode, dev_t dev)
 
int rtems_filesystem_chdir (rtems_filesystem_location_info_t *loc)
 
int rtems_filesystem_chmod (const rtems_filesystem_location_info_t *loc, mode_t mode)
 
int rtems_filesystem_chown (const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
 
void rtems_filesystem_location_remove_from_mt_entry (rtems_filesystem_location_info_t *loc)
 
void rtems_filesystem_do_unmount (rtems_filesystem_mount_table_entry_t *mt_entry)
 
void rtems_filesystem_eval_path_eat_delimiter (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_next_token (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_error (rtems_filesystem_eval_path_context_t *ctx, int eno)
 
int rtems_filesystem_location_exists_in_same_instance_as (const rtems_filesystem_location_info_t *a, const rtems_filesystem_location_info_t *b)
 Checks that the locations exist in the same file system instance. More...
 
bool rtems_filesystem_check_access (int flags, mode_t object_mode, uid_t object_uid, gid_t object_gid)
 Checks if access to an object is allowed for the current user. More...
 
bool rtems_filesystem_eval_path_check_access (rtems_filesystem_eval_path_context_t *ctx, int eval_flags, mode_t node_mode, uid_t node_uid, gid_t node_gid)
 

Variables

rtems_id rtems_libio_semaphore
 
const uint32_t rtems_libio_number_iops
 
rtems_libio_t rtems_libio_iops []
 
rtems_libio_trtems_libio_iop_freelist
 
const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers
 
rtems_filesystem_mount_table_entry_t rtems_filesystem_null_mt_entry
 
rtems_filesystem_global_location_t rtems_filesystem_global_location_null
 The global null location. More...
 
pthread_key_t rtems_current_user_env_key
 
rtems_interrupt_lock rtems_filesystem_mt_entry_lock_control
 

Detailed Description

LibIO Internal Interface.

This file is the libio internal interface.