summaryrefslogtreecommitdiff
path: root/cpukit/libcsupport/src/freenode.c
blob: 3d124c054da8f75d7aaaa696f3b1ac7aea725e74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
 *  @file
 *
 *  @brief Releases all Resources of a Location
 *  @ingroup LibIOInternal
 */
/*
 *  COPYRIGHT (c) 1989-2010.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  Modifications to support reference counting in the file system are
 *  Copyright (c) 2012 embedded brains GmbH.
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#if HAVE_CONFIG_H
  #include "config.h"
#endif

#include <rtems/libio_.h>

void rtems_filesystem_location_free( rtems_filesystem_location_info_t *loc )
{
  rtems_filesystem_instance_lock( loc );
  (*loc->mt_entry->ops->freenod_h)( loc );
  rtems_filesystem_instance_unlock( loc );
  rtems_filesystem_location_remove_from_mt_entry( loc );
}