[Obvious, ARM Testsuite] mangle-arm-crypto.C needs arm_crypto arguments added
[official-gcc.git] / libgfortran / io / lock.c
blobc224cabe5fd9f28d4ba24dd25dce4050f9812c3d
1 /* Thread/recursion locking
2 Copyright (C) 2002-2015 Free Software Foundation, Inc.
3 Contributed by Paul Brook <paul@nowt.org> and Andy Vaught
5 This file is part of the GNU Fortran runtime library (libgfortran).
7 Libgfortran is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either
10 version 3 of the License, or (at your option) any later version.
12 Libgfortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 #include "io.h"
27 #include <string.h>
28 #include <stdlib.h>
30 /* library_start()-- Called with a library call is entered. */
32 void
33 library_start (st_parameter_common *cmp)
35 if ((cmp->flags & IOPARM_LIBRETURN_ERROR) != 0)
36 return;
38 cmp->flags &= ~IOPARM_LIBRETURN_MASK;
42 void
43 free_ionml (st_parameter_dt *dtp)
45 namelist_info * t1, *t2;
47 /* Delete the namelist, if it exists. */
49 if (dtp->u.p.ionml != NULL)
51 t1 = dtp->u.p.ionml;
52 while (t1 != NULL)
54 t2 = t1;
55 t1 = t1->next;
56 free (t2->var_name);
57 if (t2->var_rank)
59 free (t2->dim);
60 free (t2->ls);
62 free (t2);
65 dtp->u.p.ionml = NULL;