Showing the changes to Source/Libraries/GSF.Core/Threading/InterprocessReaderWriterLock.cs (1 of 930 files). Show all
Unified · Split
| @@ -1,241 +1,10 @@ | |||
| 1 | //******************************************************************************************************* | 1 | //****************************************************************************************************** |
| 2 | // InterprocessReaderWriterLock.cs - Gbtc | 2 | // InterprocessReaderWriterLock.cs - Gbtc |
| 3 | // | 3 | // |
| 4 | // Tennessee Valley Authority, 2011 | 4 | // Copyright © 2012, Grid Protection Alliance. All Rights Reserved. |
| 5 | // No copyright is claimed pursuant to 17 USC § 105. All Other Rights Reserved. | ||
| 6 | // | ||
| 7 | // This software is made freely available under the TVA Open Source Agreement (see below). | ||
| 8 | // Code in this file licensed to GSF under one or more contributor license agreements listed below. | ||
| 9 | // | ||
| 10 | // Code Modification History: | ||
| 11 | // ----------------------------------------------------------------------------------------------------- | ||
| 12 | // 03/21/2011 - Ritchie | ||
| 13 | // Generated original version of source code. | ||
| 14 | // | ||
| 15 | //******************************************************************************************************* | ||
| 16 | |||
| 17 | #region [ TVA Open Source Agreement ] | ||
| 18 | /* | ||
| 19 | |||
| 20 | THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE,REPRODUCTION, DISTRIBUTION, | ||
| 21 | MODIFICATION AND REDISTRIBUTION OF CERTAIN COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE | ||
| 22 | TENNESSEE VALLEY AUTHORITY, A CORPORATE AGENCY AND INSTRUMENTALITY OF THE UNITED STATES GOVERNMENT | ||
| 23 | ("GOVERNMENT AGENCY"). GOVERNMENT AGENCY IS AN INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT | ||
| 24 | DISTRIBUTIONS OR REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, DISTRIBUTES, | ||
| 25 | MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED HEREIN, OR ANY PART THEREOF, IS, BY THAT | ||
| 26 | ACTION, ACCEPTING IN FULL THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. | ||
| 27 | |||
| 28 | Original Software Designation: openPDC | ||
| 29 | Original Software Title: The GSF Open Source Phasor Data Concentrator | ||
| 30 | User Registration Requested. Please Visit https://naspi.tva.com/Registration/ | ||
| 31 | Point of Contact for Original Software: J. Ritchie Carroll <mailto:jrcarrol@tva.gov> | ||
| 32 | |||
| 33 | 1. DEFINITIONS | ||
| 34 | |||
| 35 | A. "Contributor" means Government Agency, as the developer of the Original Software, and any entity | ||
| 36 | that makes a Modification. | ||
| 37 | |||
| 38 | B. "Covered Patents" mean patent claims licensable by a Contributor that are necessarily infringed by | ||
| 39 | the use or sale of its Modification alone or when combined with the Subject Software. | ||
| 40 | |||
| 41 | C. "Display" means the showing of a copy of the Subject Software, either directly or by means of an | ||
| 42 | image, or any other device. | ||
| 43 | |||
| 44 | D. "Distribution" means conveyance or transfer of the Subject Software, regardless of means, to | ||
| 45 | another. | ||
| 46 | |||
| 47 | E. "Larger Work" means computer software that combines Subject Software, or portions thereof, with | ||
| 48 | software separate from the Subject Software that is not governed by the terms of this Agreement. | ||
| 49 | |||
| 50 | F. "Modification" means any alteration of, including addition to or deletion from, the substance or | ||
| 51 | structure of either the Original Software or Subject Software, and includes derivative works, as that | ||
| 52 | term is defined in the Copyright Statute, 17 USC § 101. However, the act of including Subject Software | ||
| 53 | as part of a Larger Work does not in and of itself constitute a Modification. | ||
| 54 | |||
| 55 | G. "Original Software" means the computer software first released under this Agreement by Government | ||
| 56 | Agency entitled openPDC, including source code, object code and accompanying documentation, if any. | ||
| 57 | |||
| 58 | H. "Recipient" means anyone who acquires the Subject Software under this Agreement, including all | ||
| 59 | Contributors. | ||
| 60 | |||
| 61 | I. "Redistribution" means Distribution of the Subject Software after a Modification has been made. | ||
| 62 | |||
| 63 | J. "Reproduction" means the making of a counterpart, image or copy of the Subject Software. | ||
| 64 | |||
| 65 | K. "Sale" means the exchange of the Subject Software for money or equivalent value. | ||
| 66 | |||
| 67 | L. "Subject Software" means the Original Software, Modifications, or any respective parts thereof. | ||
| 68 | |||
| 69 | M. "Use" means the application or employment of the Subject Software for any purpose. | ||
| 70 | |||
| 71 | 2. GRANT OF RIGHTS | ||
| 72 | |||
| 73 | A. Under Non-Patent Rights: Subject to the terms and conditions of this Agreement, each Contributor, | ||
| 74 | with respect to its own contribution to the Subject Software, hereby grants to each Recipient a | ||
| 75 | non-exclusive, world-wide, royalty-free license to engage in the following activities pertaining to | ||
| 76 | the Subject Software: | ||
| 77 | |||
| 78 | 1. Use | ||
| 79 | |||
| 80 | 2. Distribution | ||
| 81 | |||
| 82 | 3. Reproduction | ||
| 83 | |||
| 84 | 4. Modification | ||
| 85 | |||
| 86 | 5. Redistribution | ||
| 87 | |||
| 88 | 6. Display | ||
| 89 | |||
| 90 | B. Under Patent Rights: Subject to the terms and conditions of this Agreement, each Contributor, with | ||
| 91 | respect to its own contribution to the Subject Software, hereby grants to each Recipient under Covered | ||
| 92 | Patents a non-exclusive, world-wide, royalty-free license to engage in the following activities | ||
| 93 | pertaining to the Subject Software: | ||
| 94 | |||
| 95 | 1. Use | ||
| 96 | |||
| 97 | 2. Distribution | ||
| 98 | |||
| 99 | 3. Reproduction | ||
| 100 | |||
| 101 | 4. Sale | ||
| 102 | |||
| 103 | 5. Offer for Sale | ||
| 104 | |||
| 105 | C. The rights granted under Paragraph B. also apply to the combination of a Contributor's Modification | ||
| 106 | and the Subject Software if, at the time the Modification is added by the Contributor, the addition of | ||
| 107 | such Modification causes the combination to be covered by the Covered Patents. It does not apply to | ||
| 108 | any other combinations that include a Modification. | ||
| 109 | |||
| 110 | D. The rights granted in Paragraphs A. and B. allow the Recipient to sublicense those same rights. | ||
| 111 | Such sublicense must be under the same terms and conditions of this Agreement. | ||
| 112 | |||
| 113 | 3. OBLIGATIONS OF RECIPIENT | ||
| 114 | |||
| 115 | A. Distribution or Redistribution of the Subject Software must be made under this Agreement except for | ||
| 116 | additions covered under paragraph 3H. | ||
| 117 | |||
| 118 | 1. Whenever a Recipient distributes or redistributes the Subject Software, a copy of this Agreement | ||
| 119 | must be included with each copy of the Subject Software; and | ||
| 120 | |||
| 121 | 2. If Recipient distributes or redistributes the Subject Software in any form other than source code, | ||
| 122 | Recipient must also make the source code freely available, and must provide with each copy of the | ||
| 123 | Subject Software information on how to obtain the source code in a reasonable manner on or through a | ||
| 124 | medium customarily used for software exchange. | ||
| 125 | |||
| 126 | B. Each Recipient must ensure that the following copyright notice appears prominently in the Subject | ||
| 127 | Software: | ||
| 128 | |||
| 129 | No copyright is claimed pursuant to 17 USC § 105. All Other Rights Reserved. | ||
| 130 | |||
| 131 | C. Each Contributor must characterize its alteration of the Subject Software as a Modification and | ||
| 132 | must identify itself as the originator of its Modification in a manner that reasonably allows | ||
| 133 | subsequent Recipients to identify the originator of the Modification. In fulfillment of these | ||
| 134 | requirements, Contributor must include a file (e.g., a change log file) that describes the alterations | ||
| 135 | made and the date of the alterations, identifies Contributor as originator of the alterations, and | ||
| 136 | consents to characterization of the alterations as a Modification, for example, by including a | ||
| 137 | statement that the Modification is derived, directly or indirectly, from Original Software provided by | ||
| 138 | Government Agency. Once consent is granted, it may not thereafter be revoked. | ||
| 139 | |||
| 140 | D. A Contributor may add its own copyright notice to the Subject Software. Once a copyright notice has | ||
| 141 | been added to the Subject Software, a Recipient may not remove it without the express permission of | ||
| 142 | the Contributor who added the notice. | ||
| 143 | |||
| 144 | E. A Recipient may not make any representation in the Subject Software or in any promotional, | ||
| 145 | advertising or other material that may be construed as an endorsement by Government Agency or by any | ||
| 146 | prior Recipient of any product or service provided by Recipient, or that may seek to obtain commercial | ||
| 147 | advantage by the fact of Government Agency's or a prior Recipient's participation in this Agreement. | ||
| 148 | |||
| 149 | F. In an effort to track usage and maintain accurate records of the Subject Software, each Recipient, | ||
| 150 | upon receipt of the Subject Software, is requested to register with Government Agency by visiting the | ||
| 151 | following website: https://naspi.tva.com/Registration/. Recipient's name and personal information | ||
| 152 | shall be used for statistical purposes only. Once a Recipient makes a Modification available, it is | ||
| 153 | requested that the Recipient inform Government Agency at the web site provided above how to access the | ||
| 154 | Modification. | ||
| 155 | |||
| 156 | G. Each Contributor represents that that its Modification does not violate any existing agreements, | ||
| 157 | regulations, statutes or rules, and further that Contributor has sufficient rights to grant the rights | ||
| 158 | conveyed by this Agreement. | ||
| 159 | |||
| 160 | H. A Recipient may choose to offer, and to charge a fee for, warranty, support, indemnity and/or | ||
| 161 | liability obligations to one or more other Recipients of the Subject Software. A Recipient may do so, | ||
| 162 | however, only on its own behalf and not on behalf of Government Agency or any other Recipient. Such a | ||
| 163 | Recipient must make it absolutely clear that any such warranty, support, indemnity and/or liability | ||
| 164 | obligation is offered by that Recipient alone. Further, such Recipient agrees to indemnify Government | ||
| 165 | Agency and every other Recipient for any liability incurred by them as a result of warranty, support, | ||
| 166 | indemnity and/or liability offered by such Recipient. | ||
| 167 | |||
| 168 | I. A Recipient may create a Larger Work by combining Subject Software with separate software not | ||
| 169 | governed by the terms of this agreement and distribute the Larger Work as a single product. In such | ||
| 170 | case, the Recipient must make sure Subject Software, or portions thereof, included in the Larger Work | ||
| 171 | is subject to this Agreement. | ||
| 172 | |||
| 173 | J. Notwithstanding any provisions contained herein, Recipient is hereby put on notice that export of | ||
| 174 | any goods or technical data from the United States may require some form of export license from the | ||
| 175 | U.S. Government. Failure to obtain necessary export licenses may result in criminal liability under | ||
| 176 | U.S. laws. Government Agency neither represents that a license shall not be required nor that, if | ||
| 177 | required, it shall be issued. Nothing granted herein provides any such export license. | ||
| 178 | |||
| 179 | 4. DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION | ||
| 180 | |||
| 181 | A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER | ||
| 182 | EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT | ||
| 183 | SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
| 184 | PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR | ||
| 185 | FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE. THIS | ||
| 186 | AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR | ||
| 187 | RECIPIENT OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS | ||
| 188 | RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND | ||
| 189 | LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT | ||
| 190 | "AS IS." | ||
| 191 | |||
| 192 | B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST GOVERNMENT AGENCY, ITS | ||
| 193 | AGENTS, EMPLOYEES, CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE | ||
| 194 | OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM | ||
| 195 | SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE | ||
| 196 | SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS GOVERNMENT AGENCY, ITS AGENTS, | ||
| 197 | EMPLOYEES, CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY | ||
| 198 | LAW. THE FOREGOING RELEASE AND INDEMNIFICATION SHALL APPLY EVEN IF THE LIABILITIES, DEMANDS, DAMAGES, | ||
| 199 | EXPENSES OR LOSSES ARE CAUSED, OCCASIONED, OR CONTRIBUTED TO BY THE NEGLIGENCE, SOLE OR CONCURRENT, OF | ||
| 200 | GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT. RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE | ||
| 201 | IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT. | ||
| 202 | |||
| 203 | 5. GENERAL TERMS | ||
| 204 | |||
| 205 | A. Termination: This Agreement and the rights granted hereunder will terminate automatically if a | ||
| 206 | Recipient fails to comply with these terms and conditions, and fails to cure such noncompliance within | ||
| 207 | thirty (30) days of becoming aware of such noncompliance. Upon termination, a Recipient agrees to | ||
| 208 | immediately cease use and distribution of the Subject Software. All sublicenses to the Subject | ||
| 209 | Software properly granted by the breaching Recipient shall survive any such termination of this | ||
| 210 | Agreement. | ||
| 211 | |||
| 212 | B. Severability: If any provision of this Agreement is invalid or unenforceable under applicable law, | ||
| 213 | it shall not affect the validity or enforceability of the remainder of the terms of this Agreement. | ||
| 214 | |||
| 215 | C. Applicable Law: This Agreement shall be subject to United States federal law only for all purposes, | ||
| 216 | including, but not limited to, determining the validity of this Agreement, the meaning of its | ||
| 217 | provisions and the rights, obligations and remedies of the parties. | ||
| 218 | |||
| 219 | D. Entire Understanding: This Agreement constitutes the entire understanding and agreement of the | ||
| 220 | parties relating to release of the Subject Software and may not be superseded, modified or amended | ||
| 221 | except by further written agreement duly executed by the parties. | ||
| 222 | |||
| 223 | E. Binding Authority: By accepting and using the Subject Software under this Agreement, a Recipient | ||
| 224 | affirms its authority to bind the Recipient to all terms and conditions of this Agreement and that | ||
| 225 | Recipient hereby agrees to all terms and conditions herein. | ||
| 226 | |||
| 227 | F. Point of Contact: Any Recipient contact with Government Agency is to be directed to the designated | ||
| 228 | representative as follows: J. Ritchie Carroll <mailto:jrcarrol@tva.gov>. | ||
| 229 | |||
| 230 | */ | ||
| 231 | #endregion | ||
| 232 | |||
| 233 | #region [ Contributor License Agreements ] | ||
| 234 | |||
| 235 | //****************************************************************************************************** | ||
| 236 | // | ||
| 237 | // Copyright © 2011, Grid Protection Alliance. All Rights Reserved. | ||
| 238 | // | 5 | // |
| 6 | // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See | ||
| 7 | // the NOTICE file distributed with this work for additional information regarding copyright ownership. | ||
| 239 | // The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may | 8 | // The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may |
| 240 | // not use this file except in compliance with the License. You may obtain a copy of the License at: | 9 | // not use this file except in compliance with the License. You may obtain a copy of the License at: |
| 241 | // | 10 | // |
| @@ -245,10 +14,15 @@ · 3 unmodified lines | |||
| 245 | // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the | 14 | // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the |
| 246 | // License for the specific language governing permissions and limitations. | 15 | // License for the specific language governing permissions and limitations. |
| 247 | // | 16 | // |
| 17 | // Code Modification History: | ||
| 18 | // ---------------------------------------------------------------------------------------------------- | ||
| 19 | // 03/21/2011 - Ritchie | ||
| 20 | // Generated original version of source code. | ||
| 21 | // 12/14/2012 - Starlynn Danyelle Gilliam | ||
| 22 | // Modified Header. | ||
| 23 | // | ||
| 248 | //****************************************************************************************************** | 24 | //****************************************************************************************************** |
| 249 | 25 | ||
| 250 | #endregion | ||
| 251 | |||
| 252 | using System; | 26 | using System; |
| 253 | using System.Threading; | 27 | using System.Threading; |
| 254 | 28 | ||