IEEE 1003 5 INT 1-2006 en Information Technology - POSIX Ada Language Interfaces - Part 1 Binding for System Application Program Interface (API) - Amendment 2 P.pdf

上传人:赵齐羽 文档编号:1247978 上传时间:2019-09-02 格式:PDF 页数:3 大小:11.33KB
下载 相关 举报
IEEE 1003 5 INT 1-2006 en Information Technology - POSIX Ada Language Interfaces - Part 1 Binding for System Application Program Interface (API) - Amendment 2 P.pdf_第1页
第1页 / 共3页
IEEE 1003 5 INT 1-2006 en Information Technology - POSIX Ada Language Interfaces - Part 1 Binding for System Application Program Interface (API) - Amendment 2 P.pdf_第2页
第2页 / 共3页
IEEE 1003 5 INT 1-2006 en Information Technology - POSIX Ada Language Interfaces - Part 1 Binding for System Application Program Interface (API) - Amendment 2 P.pdf_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、IEEE-SA - IEEE Std 1003.5-1992 interpretationsIEEE Standards Interpretations for IEEE Std 1003.5 (1999 Edition) - IEEE Standard for Information Technology-POSIX Ada Language Interfaces-PART 1: Binding for System Application Program Interface Copyright 2006 by the Institute of Electrical and Electron

2、ics Engineers, Inc. All Rights Reserved.This is an interpretation of IEEE Std 1003.5 (1999 Edition). Interpretations are issued to explain and clarify the intent of a standard and are not intended to constitute an alteration to the original standard or to supply consulting information. Permission is

3、 hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standard Department for the appropriate license. Use of the information contained in this do

4、cument is at your own risk.IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, P. O. Box 1331 Piscataway, New Jersey 08855-1331, USADecember 2006 Interpretation Number: #1 Topic: Open_And_Map_Shared_Memory and Open_Or_Create_And_Map_Shared_Memory functions. Relevant Clauses: 12.5.1.2

5、Interpretation request #1 This standard states that these functions are equivalent to a sequence of calls. This includes a call to Open_Shared_Memory, with the Mode parameter set as follows: “If the value of Protection is set to Allow_Write, Mode is Read_Write; otherwise Mode is Read_Only.“However,

6、Protection is a /set/ of options and may be set to “Allow_Write + Allow_Read“. By following the standard literally, this would lead to a Mode of Read_Only, which was clearly not what was intended.This interpretation would make these functions unusable for opening or creating a shared memory mapping

7、with both read and write access, which this user supposes is the most commonly desired mode of operation.However, this user sees two possible interpretations that would make the functions usable:1. The quoted sentence above should be interpreted as “If the value of Protection /includes/ Allow_Write,

8、 Mode is Read_Write; otherwise Mode is Read_Only.“2. As it is not specified exactly how the Protection parameter should be used in the subsequent call to Map_Memory, a possible interpretation would be that one should always add the Allow_Read option in the call to Map_Memory.http:/standards.ieee.org

9、/findstds/interps/1003.5-1999.html (1 of 3)11/4/2011 10:16:17 PMIEEE-SA - IEEE Std 1003.5-1992 interpretationsIn this users opinion, number #2 (above) is counterintuitive, as one would expect the protection parameters passed on to Map_Memory being the same as those initially submitted. And besides t

10、hat, this would decrease the flexibility by not allowing the user to create a write-only mapping.To illustrate the problematics, a simple example will follow. The example consists of two Ada functions which communicate via a shared memory area. With a common implementation of the IEEE 1003.5 (Floris

11、t), the problem arises in the form of a Storage_Error when trying to access the shared area:-shmserv.adb- with POSIX_Generic_Shared_Memory, POSIX_IO, POSIX_Memory_Mapping, POSIX.Permissions; with Ada.Text_IO;procedure Shmserv is type Data is record I : Integer; J : Integer; end record; package GSM i

12、s new Posix_Generic_Shared_Memory(Data); Descriptor : POSIX_IO.File_Descriptor; Data_Access : GSM.Shared_Access; begin Descriptor := GSM.Open_Or_Create_And_Map_Shared_Memory (“/foo“, POSIX_Memory_Mapping.Allow_Write, POSIX.Permissions.Access_Permission_Set); Data_Access := GSM.Access_Shared_Memory(D

13、escriptor); Data_Access.I := 1; loop Ada.Text_IO.Put_Line(IntegerImage(Data_Access.I); delay(0.5); end loop; end Shmserv; -end shmserv.adb-shmcli.adb- with POSIX_Generic_Shared_Memory, POSIX_IO, POSIX_Memory_Mapping; procedure Shmcli is type Data is record I : Integer; J : Integer; end record; packa

14、ge GSM is new Posix_Generic_Shared_Memory(Data); Descriptor : POSIX_IO.File_Descriptor; Data_Access : GSM.Shared_Access; begin Descriptor := GSM.Open_And_Map_Shared_Memory (“/foo“, POSIX_Memory_Mapping.Allow_Write); Data_Access := GSM.Access_Shared_Memory(Descriptor); loop Data_Access.I := Data_Acce

15、ss.I + 1; delay(1.0); end loop; end Shmcli; -end shmcli.adb-The current Florist implementation of Open_And_Map_Shared_Memory is defined as follows:- function Open_And_Map_Shared_Memory (Name : POSIX.POSIX_String; Protection : POSIX.Memory_Mapping.Protection_Options; Masked_Signals : POSIX.Signal_Mas

16、king := POSIX.RTS_Signals) return POSIX.IO.File_Descriptor is FD : POSIX.IO.File_Descriptor; Mode : POSIX.IO.File_Mode; begin if Protection = POSIX.Memory_Mapping.Allow_Write then Mode := POSIX.IO.Read_Write; else Mode := POSIX.IO.Read_Only; end if; Begin_Critical_Section; begin FD := POSIX.Shared_M

17、emory_Objects.Open_Shared_Memory (Name, Mode, POSIX.IO.Empty_Set, Masked_Signals); POSIX.IO.Truncate_File (FD, Length); Insert_Node (FD, POSIX.Memory_Mapping.Map_Memory (System.Storage_Elements.Storage_Offset (Length), Protection, POSIX.Memory_Mapping.Map_Shared, FD, 0); End_Critical_Section; except

18、ion when others = End_Critical_Section; raise; end; return FD; end Open_And_Map_Shared_Memory; -Interpretation Response #1 There is a problem with the wording of 12.5.1.2, and that your suggested intepretation (item 1 above) is correct. That is where the standard says http:/standards.ieee.org/findst

19、ds/interps/1003.5-1999.html (2 of 3)11/4/2011 10:16:17 PMIEEE-SA - IEEE Std 1003.5-1992 interpretations“If the value of Protection is set to Allow_Write, Mode is Read_Write; otherwise Mode is Read_Only to convey the intended meaning it should instead say“If the value of Protection *includes* Allow_W

20、rite, Mode is Read_Write; otherwise Mode is Read_Only“.Accordingly, it seems the “=“ test in the Florist implementation code below should be changed to “=“.if Protection = POSIX.Memory_Mapping.Allow_Write then Mode := POSIX.IO.Read_Write; else Mode := POSIX.IO.Read_Only; end if;http:/standards.ieee.org/findstds/interps/1003.5-1999.html (3 of 3)11/4/2011 10:16:17 PM

展开阅读全文
相关资源
  • IEC TS 62492-1-2008 Industrial process control devices - Radiation thermometers - Part 1 Technical data for radiation thermometers《工业过程控制装置 辐射温度计 第1部分 辐射温度计的技术数.pdfIEC TS 62492-1-2008 Industrial process control devices - Radiation thermometers - Part 1 Technical data for radiation thermometers《工业过程控制装置 辐射温度计 第1部分 辐射温度计的技术数.pdf
  • IEC TR2 61464-1998 Insulated bushings - Guide for the interpretation of dissolved gas analysis (DGA) in bushings where oil is the impregnating medium of the mai.pdfIEC TR2 61464-1998 Insulated bushings - Guide for the interpretation of dissolved gas analysis (DGA) in bushings where oil is the impregnating medium of the mai.pdf
  • IEC TR 61241-2-2-1993 Electrical apparatus for use in the presence of combustible dust part 2 test methods section 2 method for determining the electrical resis.pdfIEC TR 61241-2-2-1993 Electrical apparatus for use in the presence of combustible dust part 2 test methods section 2 method for determining the electrical resis.pdf
  • IEC TR 60972-1989 Classification and interpretation of new lighting products《新型照明产品的分类和说明》.pdfIEC TR 60972-1989 Classification and interpretation of new lighting products《新型照明产品的分类和说明》.pdf
  • IEC TR 60943 Edition 21-2009 Guidance concerning the permissible temperature rise for parts of electrical equipment in particular for terminals《特殊终端中电气设备部件用关于允许.pdfIEC TR 60943 Edition 21-2009 Guidance concerning the permissible temperature rise for parts of electrical equipment in particular for terminals《特殊终端中电气设备部件用关于允许.pdf
  • IEC TR 60943 AMD 1-2008 Guidance concerning the permissible temperature rise for parts of electrical equipment in particular for terminals Amendment 1《电气设备部件(特别.pdfIEC TR 60943 AMD 1-2008 Guidance concerning the permissible temperature rise for parts of electrical equipment in particular for terminals Amendment 1《电气设备部件(特别.pdf
  • IEC TR 60919-2-2008 Performance of high-voltage direct current (HVDC) systems with line-communicated converters - Part 2 Faults and switching《带线性通信转换器的高压直流(HVDC.pdfIEC TR 60919-2-2008 Performance of high-voltage direct current (HVDC) systems with line-communicated converters - Part 2 Faults and switching《带线性通信转换器的高压直流(HVDC.pdf
  • IEC TR 60870-6-505 Edition 11-2006 Telecontrol equipment and systems - Part.6-505 Telecontrol protocols compatible with ISO standards and ITU-T recommendations .pdfIEC TR 60870-6-505 Edition 11-2006 Telecontrol equipment and systems - Part.6-505 Telecontrol protocols compatible with ISO standards and ITU-T recommendations .pdf
  • IEC TR 60344 CORR1-2012 Calculation of d c resistance of plain and coated copper conductors of low-frequency cables and wires - Application guide Corrigendum 1《.pdfIEC TR 60344 CORR1-2012 Calculation of d c resistance of plain and coated copper conductors of low-frequency cables and wires - Application guide Corrigendum 1《.pdf
  • IEC 62560 CORR1-2012 Self-ballasted LED-lamps for general lighting services by voltage 50 V - Safety specifications Corrigendum 1《普通照明用50 V以上自镇流LED灯 安全要求 勘误表1》.pdfIEC 62560 CORR1-2012 Self-ballasted LED-lamps for general lighting services by voltage 50 V - Safety specifications Corrigendum 1《普通照明用50 V以上自镇流LED灯 安全要求 勘误表1》.pdf
  • 猜你喜欢
  • DIN EN ISO 6433-2012 Technical product documentation Part references (ISO 6433 2012) German version EN ISO 6433 2012《技术产品文件 零件参照(ISO 6433-2012) 德文版本EN ISO 6433-2012》.pdf DIN EN ISO 6433-2012 Technical product documentation Part references (ISO 6433 2012) German version EN ISO 6433 2012《技术产品文件 零件参照(ISO 6433-2012) 德文版本EN ISO 6433-2012》.pdf
  • DIN EN ISO 6465-2009 Spices - Cumin (Cuminum cyminum L ) - Specification (ISO 6465 2009) English version of DIN EN ISO 6465 2009-11《香料 枯茗的规格(ISO 6465 2009) 德文版本EN ISO 6465 2009》.pdf DIN EN ISO 6465-2009 Spices - Cumin (Cuminum cyminum L ) - Specification (ISO 6465 2009) English version of DIN EN ISO 6465 2009-11《香料 枯茗的规格(ISO 6465 2009) 德文版本EN ISO 6465 2009》.pdf
  • DIN EN ISO 6468-1997 Water quality - Determination of certain organochlorine insecticides polychlorinated biphenyls and chlorobenzenes - Gas-chromatographic method after liquid-liq.pdf DIN EN ISO 6468-1997 Water quality - Determination of certain organochlorine insecticides polychlorinated biphenyls and chlorobenzenes - Gas-chromatographic method after liquid-liq.pdf
  • DIN EN ISO 648-2009 Laboratory glassware - Single-volume pipettes (ISO 648 2008) English version of DIN EN ISO 648 2009-01《实验室玻璃器皿 单一容量吸液管》.pdf DIN EN ISO 648-2009 Laboratory glassware - Single-volume pipettes (ISO 648 2008) English version of DIN EN ISO 648 2009-01《实验室玻璃器皿 单一容量吸液管》.pdf
  • DIN EN ISO 6497-2005 Animal feeding stuffs - Sampling (ISO 6497 2002) German version EN ISO 6497 2005《动物饲料 抽样》.pdf DIN EN ISO 6497-2005 Animal feeding stuffs - Sampling (ISO 6497 2002) German version EN ISO 6497 2005《动物饲料 抽样》.pdf
  • DIN EN ISO 6498-2012 Animal feeding stuffs - Guidelines for sample preparation (ISO 6498 2012) German version EN ISO 6498 2012《动物饲料 试样制备导则 (ISO 6498-2012) 德文版本EN ISO 6498-2012》.pdf DIN EN ISO 6498-2012 Animal feeding stuffs - Guidelines for sample preparation (ISO 6498 2012) German version EN ISO 6498 2012《动物饲料 试样制备导则 (ISO 6498-2012) 德文版本EN ISO 6498-2012》.pdf
  • DIN EN ISO 6504-1-2006 Paints and varnishes - Determination of hiding power - Part 1 Kubelka-Munk method for white and light-coloured paints (ISO 6504-1 1983) English version of DI.pdf DIN EN ISO 6504-1-2006 Paints and varnishes - Determination of hiding power - Part 1 Kubelka-Munk method for white and light-coloured paints (ISO 6504-1 1983) English version of DI.pdf
  • DIN EN ISO 6504-3-2007 Paints and varnishes - Determination of hiding power - Part 3 Determination of contrast ratio of light-coloured paints at a fixed spreading rate (ISO 6504-3 .pdf DIN EN ISO 6504-3-2007 Paints and varnishes - Determination of hiding power - Part 3 Determination of contrast ratio of light-coloured paints at a fixed spreading rate (ISO 6504-3 .pdf
  • DIN EN ISO 6506-1-2015 Metallic materials - Brinell hardness test - Part 1 Test method (ISO 6506-1 2014) German version EN ISO 6506-1 2014《金属材料 布氏硬度试验 第1部分 试验方法(ISO 6506-1-2014) 德文.pdf DIN EN ISO 6506-1-2015 Metallic materials - Brinell hardness test - Part 1 Test method (ISO 6506-1 2014) German version EN ISO 6506-1 2014《金属材料 布氏硬度试验 第1部分 试验方法(ISO 6506-1-2014) 德文.pdf
  • 相关搜索

    当前位置:首页 > 标准规范 > 国际标准 > IEC

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1