Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001, Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2.1 of the GNU Lesser General Public License 00007 as published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU Lesser General Public 00021 License along with this program; if not, write the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 00023 USA. 00024 00025 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00026 Mountain View, CA 94043, or: 00027 00028 http://www.sgi.com 00029 00030 For further information regarding this notice, see: 00031 00032 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00033 00034 */ 00035 00036 00037 00038 #pragma ident "@(#) libf/fio/globals.c 92.2 06/23/99 16:08:16" 00039 00040 /* 00041 * globals.c This module contains global data and tables with 00042 * dynamic data. 00043 */ 00044 00045 #include <fortran.h> 00046 #include "fio.h" 00047 #include <cray/mtlock.h> 00048 00049 /************************************************************************ 00050 * 00051 * Shared global data. 00052 * 00053 ***********************************************************************/ 00054 00055 plock_t _openlock; /* Unit tables lock. Lock this 00056 * whenever connecting or disconnecting 00057 * a unit. This lock must be obtained 00058 * before the unit lock to prevent 00059 * deadlock. */ 00060 plock_t _ioblock; /* __iob table lock */ 00061 plock_t _parselock; /* Format parsing lock */ 00062 plock_t _stdin_lock; /* Stdin lock */ 00063 plock_t _stdout_lock; /* Stdout lock */ 00064 plock_t _stderr_lock; /* Stderr lock */ 00065 int _f_rcsz = RECMAX; /* Default sequential formatted RECL */ 00066 int _f_ldsz = RECMAXLDO; /* Default list-directed output RECL */ 00067 00068 unit_htable _fort_unit[HASH_SIZE]; /* hash table of unit pointers */ 00069 00070 unit *_fort_internal_unit; /* pointer to unit for internal files */ 00071 00072 #ifdef _F_REAL4 00073 int _dreal4; /* decimal digits for real (KIND=4) */ 00074 #endif 00075 int _dreal8; /* decimal digits for real (KIND=8) */ 00076 int _dreal16; /* decimal digits for real (KIND=16) */ 00077 00078 long _zero_entity = 0; /* Used as addr for zero length */ 00079 /* entity for PRESENT function */ 00080 00081 00082 /************************************************************************ 00083 * 00084 * Private global data. 00085 * 00086 * The _tsk_fiostate structure is taskcommon, so the C compiler kindly 00087 * replicates it for every active task. 00088 * 00089 ***********************************************************************/ 00090 #ifdef _CRAY1 00091 #pragma _CRI taskcommon _tsk_fiostate 00092 #endif 00093 struct fiostate _tsk_fiostate; 00094 00095 SHARED_CC_BUG_WORKAROUND(_globals_kludge_func)