source: rtems/cpukit/include/rtems/fs.h @ 9b4422a2

4.11
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on May 3, 2012 at 3:09:24 PM

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/**
2 * @file rtems/fs.h
3 *
4 * This file defines basic filesystem types
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2011.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  Modifications to support reference counting in the file system are
12 *  Copyright (c) 2012 embedded brains GmbH.
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.com/license/LICENSE.
17 */
18
19#ifndef _RTEMS_FS_H
20#define _RTEMS_FS_H
21
22#include <rtems/chain.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/*
29 *  File descriptor Table Information
30 */
31
32/* Forward declarations */
33
34/* FIXME: shouldn't this better not be here? */
35typedef struct rtems_libio_tt rtems_libio_t;
36
37struct rtems_filesystem_mount_table_entry_tt;
38typedef struct rtems_filesystem_mount_table_entry_tt
39    rtems_filesystem_mount_table_entry_t;
40
41typedef struct _rtems_filesystem_file_handlers_r
42    rtems_filesystem_file_handlers_r;
43typedef struct _rtems_filesystem_operations_table
44    rtems_filesystem_operations_table;
45
46/**
47 * @brief File system location.
48 *
49 * @ingroup LibIO
50 */
51typedef struct rtems_filesystem_location_info_tt {
52   rtems_chain_node                         mt_entry_node;
53   void                                    *node_access;
54   void                                    *node_access_2;
55   const rtems_filesystem_file_handlers_r  *handlers;
56   const rtems_filesystem_operations_table *ops;
57   rtems_filesystem_mount_table_entry_t    *mt_entry;
58} rtems_filesystem_location_info_t;
59
60/**
61 * @brief Global file system location.
62 *
63 * @ingroup LibIO
64 *
65 * The global file system locations are used for
66 * - the mount point location in the mount table entry,
67 * - the file system root location in the mount table entry,
68 * - the root directory location in the user environment, and
69 * - the current directory location in the user environment.
70 *
71 * During the path evaluation global start locations are obtained to ensure
72 * that the current file system will be not unmounted in the meantime.
73 *
74 * To support a release within critical sections of the operating system a
75 * deferred release is supported.  This is similar to malloc() and free().
76 *
77 * @see rtems_filesystem_global_location_obtain() and
78 * rtems_filesystem_global_location_release().
79 */
80typedef struct rtems_filesystem_global_location_t {
81  rtems_filesystem_location_info_t location;
82  int reference_count;
83
84  /**
85   * A release within a critical section of the operating system will add this
86   * location to a list of deferred released locations.  This list is processed
87   * in the next rtems_filesystem_global_location_obtain() in FIFO order.
88   */
89  struct rtems_filesystem_global_location_t *deferred_released_next;
90
91  /**
92   * A release within a critical section can happen multiple times.  This field
93   * counts the deferred releases.
94   */
95  int deferred_released_count;
96} rtems_filesystem_global_location_t;
97
98/*
99 * Return the mount table entry for a path location.
100 */
101#define rtems_filesystem_location_mount(_pl) ((_pl)->mt_entry)
102
103#ifdef __cplusplus
104}
105#endif
106
107#endif
108/* end of include file */
Note: See TracBrowser for help on using the repository browser.