From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp4-2.free.fr!not-for-mail Subject: Re: is there a version of unix written in Ada Newsgroups: comp.lang.ada References: <27b1bda0-bf22-4bd1-a5f9-2085c8ff2014n@googlegroups.com> <5f20233c$0$24260$426a74cc@news.free.fr> From: DrPi <314@drpi.fr> Autocrypt: addr=314@drpi.fr; keydata= mQENBF32JxoBCADDRN+UICv8kctOM5Og8oEKuUptvEIj85W+QdBwnuhh4vd4dvEORT0lAho9 CgLLCsHVjfyKLppOmmv0DJ35r6Xb0/VIGcjbKou0Ghj38JbqDHWip2MTQoRO26fHryUBaUGx WBDgRpHjxCN7dsVdos64PAT7oYrZdsfanCVFOZRBlKPs7swzEMcFEcnGeYRq4SZ8sHobvqx/ FAFfBF5GU0hIxqEgj8W0ClXnCjJHEJ+CDwEJqQjxVB+zRpy1omg+qh65GiaaZcrrzILqLhcK +iI+K+7fTUNvpZEyX73PV0KtxhQSg9WXIglMf+d0fWKirvazEARbEVtiu1X/gNyQSzwXABEB AAG0HU5pY29sYXNQSSA8ZHIucGlAbGFwb3N0ZS5uZXQ+iQFUBBMBCAA+FiEEUWtEtxrU+o6J atl0rudALSLxmhUFAl32Jx0CGwMFCQHhM4AFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ rudALSLxmhVcLAf+O00kuRMbhXBapJqnxr0IETu3Ae0FUIA+99J+Z8M/VB/PoWbbIo5UfsXS VRcvRoVS9VMgfRarR81BLzJGvfA2fpQJNQbR0b+CILum3EdwaRFfSHI/Jt5jhQjRNzntWAQ6 ZjX/XR7TmyFd7m+Wu0QMXdl+EHSNnXu8pF31GOx4Pq1nULdPexZrYMMq7NuqdvkU0sQR54m2 rE5czaId4WPg1IboGNH0R6sxikBsi2xCNBp5OSmklBJg4fzftQVkj9AKJTQhOEfMqrbLw/o7 18wOhUMr7LOoNALQWl0SWzzzTnUGbduIO7v8xnjqCTSD6nb6eMDrmrcVo7QoMkGE/16m0bkB DQRd9iccAQgAqkHGNGnw+X/ROIaFsvvxiiIJYua5Hud93U27qkeg+alKdxq5qe9jZ1FHUb3h rj619JAC19UDMTJWHE4NFJxNVilbYmEYiPMTxtapCocERdbOGK7iVkCmCUeP03L4EYaW0bop lVUUrxCksS6j72iPh4GGoVUe1tRVZMiyWzC62GJ3Zu9eoD8ZAfjCdhPl/j+Jk1I4LKb898GM 4rAdltzmIDTQ622mTMCEvhemofLe45hVp+ZgZKcC/8bM1eI0M/0q58PjfPbIR6DAewJYklkK KKmG0LsBCA5cNycLA9Y6AykdA+yH2KDvu4RTbctiQgjA0FsmuShcTFL1ZZmB0EYopwARAQAB iQE8BBgBCAAmFiEEUWtEtxrU+o6Jatl0rudALSLxmhUFAl32JxwCGwwFCQHhM4AACgkQrudA LSLxmhWJOAgAkD7ftl/cptFobPuu/1ntMD+Bzunsjz4+dXIg/znqcfPy537lCpLwElsxyWWk pyDmKCi3PdrBlf2tVI0LAfH7bJ46yIfg8z+2mQ7xfUfeZUcdCKX4yehV6QoGCpnOFEjFu5F/ fPh/HnPhENmKglCcRrpE9yeLG0unarwHvn0nTUuCFH4K5ciUdxPT2Rq2Zb+gMLvkOFJqh/DD +IIgwuvOoZ2FC61czsnocTF81l9+DXRM95atvCpB5zX1ri442nfkOHuF063NyPOKViLXxkSC ysOf87EAAPLM6UasJn84VveZpkCHdihc3DoTnn9OwxOgF/z1wRyJk+kBY4pw40x6lw== Date: Wed, 29 Jul 2020 11:20:23 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Message-ID: <5f213f5a$0$6446$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 29 Jul 2020 11:20:26 CEST NNTP-Posting-Host: 82.65.30.55 X-Trace: 1596014426 news-3.free.fr 6446 82.65.30.55:50798 X-Complaints-To: abuse@proxad.net Xref: reader01.eternal-september.org comp.lang.ada:59579 List-Id: Le 28/07/2020 à 18:48, Simon Wright a écrit : > DrPi <314@drpi.fr> writes: > >> Ada has embedded thread scheduling. What's the usefulness of m2os ? > > The Ada language defines the syntax and semantics of tasking, but > whether an implementation supports tasking is a different matter. > > If tasking is supported, there will be a runtime system that provides > it, and the compiler knows how to translate the code you write into > calls on that runtime system. If you write 'task T;' the code generated > by GNAT (in a Ravenscar system) will call > > procedure Create_Restricted_Task > (Priority : Integer; > Stack_Address : System.Address; > Size : System.Parameters.Size_Type; > Sec_Stack_Address : System.Secondary_Stack.SS_Stack_Ptr; > Secondary_Stack_Size : System.Parameters.Size_Type; > Task_Info : System.Task_Info.Task_Info_Type; > CPU : Integer; > State : Task_Procedure_Access; > Discriminants : System.Address; > Elaborated : Access_Boolean; > Chain : in out Activation_Chain; > Task_Image : String; > Created_Task : Task_Id); > > The procedure body is the business of the specific runtime system. > > M2OS doesn't support Ada tasking at all. Instead, it provides a set of > primitive operations or API (see the web site); to create a "task", you > provide an initialization procedure and a body procedure and call an API > operation to register the code so that it can be called when necessary. > > A higher-level facility can translate your code using (some?) Ada > tasking constructs into equivalent code calling the M2OS API. > > The advantage claimed is that the memory footprint is much reduced, so > that the application will fit into a smaller MCU. > Thanks for the explanation. Difficult to understand how adding a software layer achieves a lower resources consumption.