diff --git a/LICENSE.Apache2 b/LICENSE.Apache2 deleted file mode 100644 index 261eeb9e9..000000000 --- a/LICENSE.Apache2 +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/LICENSE.GPLv3 b/LICENSE.GPLv3 deleted file mode 100644 index f288702d2..000000000 --- a/LICENSE.GPLv3 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/LICENSE.MulanPSL2 b/LICENSE.MulanPSL2 index 5729580d9..7cf215730 100644 --- a/LICENSE.MulanPSL2 +++ b/LICENSE.MulanPSL2 @@ -53,8 +53,8 @@ 3, 请将如下声明文本放入每个源文件的头部注释中。 - Copyright (c) [Year] [name of copyright holder] - [Software Name] is licensed under Mulan PSL v2. + Copyright (c) [2023] [Syswonder Community] + [Rukos] is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 @@ -118,8 +118,8 @@ iii Attach the statement to the appropriate annotated syntax at the beginning of each source file. - Copyright (c) [Year] [name of copyright holder] - [Software Name] is licensed under Mulan PSL v2. + Copyright (c) [2023] [Syswonder Community] + [Rukos] is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 diff --git a/LICENSE.MulanPubL2 b/LICENSE.MulanPubL2 deleted file mode 100644 index 2fcd23f58..000000000 --- a/LICENSE.MulanPubL2 +++ /dev/null @@ -1,183 +0,0 @@ - 木兰公共许可证, 第2版 - -木兰公共许可证, 第2版 - -2021年5月 http://license.coscl.org.cn/MulanPubL-2.0 - -您对“贡献”的复制、使用、修改及分发受木兰公共许可证,第2版(以下简称“本许可证”)的如下条款的约束: - -0. 定义 - -“贡献” 是指由“贡献者”许可在“本许可证”下的受版权法保护的作品,包括最初“贡献者”许可在“本许可证”下的作品及后续“贡献者”许可在“本许可证”下的“衍生作品”。 - -“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 - -“法人实体” 是指提交贡献的机构及其“关联实体”。 - -“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的“控制”是指拥有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 - -“衍生作品” 是指基于“贡献”创作的作品,具体包括对全部或部分“贡献”进行修改、重写、翻译、注释、组合或与之链接(包括动态链接或静态链接)而形成的作品。仅与“贡献”进行进程间通信或系统调用的作品是独立作品,不属于“衍生作品”。 - -“对应源代码” 是指生成、安装和(对于可执行作品)运行目标代码所需的所有源文件和与之关联的接口定义文件,以及控制这些活动的脚本,但不包括编译环境、编译工具、云服务平台(如果有)。 - -“分发” 是指通过任何媒介向他人提供“贡献”或“衍生作品”的行为,以及利用“贡献”或“衍生作品”通过网络远程给用户提供服务的行为,例如:通过利用“贡献”或“衍生作品”搭建的云服务平台提供在线服务的行为。 - -1. 授予版权许可 - -每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、“分发”其“贡献”或“衍生作品”,不论修改与否。 - -2. 授予专利许可 - -每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销的情形除外)专利许可,供您使用、制造、委托制造、销售、许诺销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”中的专利权利要求,而不包括仅因您对“贡献”的修改而将必然会侵犯到的专利权利要求。如果您或您的“关联实体”直接或间接地,就“贡献”对任何人发起专利侵权诉讼(包括在诉讼中提出反诉请求或交叉请求)或发起其他专利维权行动,则“贡献者”根据“本许可证”授予您的专利许可自您发起专利诉讼或专利维权行动之日终止。 - -3. 无商标许可 - -“贡献者”在“本许可证”下不提供对其商品名称、商标、服务标识或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用的情形除外。 - -4. 分发限制 - -您可以将您接收到的“贡献”或您的“衍生作品”以源程序形式或可执行形式重新“分发”,但必须满足下列条件: - -(1)您必须向接收者提供“本许可证”的副本,并保留“贡献”中的版权、商标、专利及免责声明;并且, - -(2)如果您“分发”您接收到的“贡献”,您必须使用“本许可证”提供该“贡献”的源代码副本;如果您 “分发”您的“衍生作品”,您必须: - -(i)随“衍生作品”提供使用“本许可证”“分发”的您的“衍生作品”的“对应源代码”。如果您通过下载链接提供前述“对应源代码”,则您应将下载链接地址置于“衍生作品”或其随附文档中的明显位置,有效期自该“衍生作品”“分发”之日起不少于三年,并确保接收者可以获得“对应源代码”;或者, - -(ii)随“衍生作品”向接收者提供一个书面要约,表明您愿意提供根据“本许可证”“分发”的您“衍生作品”的“对应源代码”。该书面要约应置于“衍生作品”中的明显位置,并确保接收者根据书面要约可获取“对应源代码”的时间从您接到该请求之日起不得超过三个月,且有效期自该“衍生作品”“分发”之日起不少于三年。 - -5. 违约与终止 - -如果您违反“本许可证”,任何“贡献者”有权书面通知您终止其根据“本许可证”授予您的许可。该“贡献者”授予您的许可自您接到其终止通知之日起终止。仅在如下两种情形下,即使您收到“贡献者”的通知也并不终止其授予您的许可: - -(1)您在接到该终止通知之前已停止所有违反行为; - -(2)您是首次收到该“贡献者”根据“本许可证”发出的书面终止通知,并且您在收到该通知后30天内已停止所有违反行为。 - -只要您下游的接收者遵守“本许可证”的相关规定,即使您在“本许可证”下被授予的许可终止,不影响下游的接收者根据“本许可证”享有的权利。 - -6. 例外 - -如果您将“贡献”与采用GNU AFFERO GENERAL PUBLIC LICENSE Version 3(以下简称“AGPLv3”)或其后续版本的作品结合形成新的“衍生作品”,且根据“AGPLv3”或其后续版本的要求您有义务将新形成的“衍生作品”以“AGPLv3”或其后续版本进行许可的,您可以根据“AGPLv3”或其后续版本进行许可,只要您在“分发”该“衍生作品”的同时向接收者提供“本许可证”的副本,并保留“贡献”中的版权、商标、专利及免责声明。但任何“贡献者”不会因您选择“AGPLv3”或其后续版本而授予该“衍生作品”的接收者更多权利。 - -7. 免责声明与责任限制 - -“贡献”在提供时不带有任何明示或默示的担保。在任何情况下,“贡献者”或版权人不对任何人因使用“贡献”而引发的任何直接或间接损失承担任何责任,不论该等损失因何种原因导致或者基于何种法律理论,即使其曾被告知有该等损失的可能性。 - -8. 语言 - -“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何不一致,以中文版为准。 - -条款结束 - -如何将木兰公共许可证,第2版,应用到您的软件 - -如果您希望将木兰公共许可证,第2版,应用到您的软件,为了方便接收者查阅,建议您完成如下三步: - -1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; - -2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; - -3, 请将如下声明文本放入每个源文件的头部注释中。 - -Copyright (c) [Year] [name of copyright holder] -[Software Name] is licensed under Mulan PubL v2. -You can use this software according to the terms and conditions of the Mulan PubL v2. -You may obtain a copy of Mulan PubL v2 at: - http://license.coscl.org.cn/MulanPubL-2.0 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PubL v2 for more details. - - - Mulan Public License,Version 2 - -Mulan Public License,Version 2 (Mulan PubL v2) - -May 2021 http://license.coscl.org.cn/MulanPubL-2.0 - -Your reproduction, use, modification and Distribution of the Contribution shall be subject to Mulan Public License, Version 2 (this License) with following terms and conditions: - -0. Definition - -Contribution means the copyrightable work licensed by a particular Contributor under this License, including the work licensed by the initial Contributor under this License and its Derivative Work licensed by any subsequent Contributor under this License. - -Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. - -Legal Entity means the entity making a Contribution and all its Affiliates. - -Affiliates mmeans entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. - -Derivative Work means works created based on Contribution, specifically including works formed by modifying, rewriting, translating, annotating, combining or linking to all or part of Contribution (including dynamic linking or static linking). Works which only communicate with Contribution through inter-process communication or system call, are independent works, rather than Derivative Work. - -Corresponding Source Code means all the source code needed to generate, install, and (for an executable work) run the object code including the interface definition files associated with source files for the work, and scripts to control those activities, excluding of compilation environment and compilation tools, cloud services platform (if any). - -Distribute (or Distribution) means the act of making the Contribution or Derivative Work available to others through any medium, and using the Contribution or Derivative Work to provide online services to users, such as the act of providing online services through a cloud service platform built using Contributions or Derivative Works. - -1. Grant of Copyright License - -Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or Distribute its Contribution or Derivative Work, with modification or not. - -2. Grant of Patent License - -Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to use, make, have made, sell, offer for sale, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, excluding of any patent claims solely be infringed by your modification. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that any Contribution infringes patents, then any patent license granted to you under this License for the Contribution shall terminate as of the date such litigation or activity is filed or taken. - -3. No Trademark License - -No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4. - -4. Distribution Restriction - -You may Distribute the Contribution you received or your Derivative Work, whether in source or executable forms, provided that you meet the following conditions: - -1) You must provide recipients with a copy of this License and retain copyright, trademark, patent and disclaimer statements in the Contribution; and, - -2) If you Distribute the Contribution you received, you must provide copies of the Contribution’s source code under this License; - -If you Distribute your Derivative Work, you have to: - -(i) accompanying the Derivative work, provide recipients with Corresponding Source Code of your Derivative Work under this License. If you provide the Corresponding Source Code through a download link, you should place such link address prominently in the Derivative Work or its accompanying documents, and be valid no less than three years from your Distribution of the particular Derivative Work, and ensure that the recipients can acquire the Corresponding Source Code through the link; or, - -(ii) accompanying the Derivative Work, provide recipients with a written offer indicating your willingness to provide the Corresponding Source Code of the Derivative Work licensed under this License. Such written offer shall be placed prominently in the Derivative Work or its accompanying documents. Without reasonable excuse, the recipient shall be able to acquire the Corresponding Source code of the Derivative work for no more than three months from your receipt of a valid request, and be valid no less than three years from your Distribution of the particular Derivative Work. - -5. Breach and Termination - -If you breach this License, any Contributor has the right to notify you in writing to terminate its license granted to you under this License. The license granted to you by such Contributor terminates upon your receipt of such notice of termination. Notwithstanding the foregoing, your license will not be terminated even if you receive a notice of termination from Contributor, provided that: - -1) you have cured all the breaches prior to receiving such notice of termination; or, - -2) it’s your first time to receive a notice of termination from such Contributor pursuant to this License, and you have cured all the breaches within 30 days of receipt of such notice. - -Termination of your license under this License shall not affect the downstream recipient's rights under this License, provided that the downstream recipient complies with this License. - -6. Exceptions - -If you combine Contribution or your Derivative Work with a work licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (hereinafter referred to as “AGPLv3”) or its subsequent versions, and according to the AGPLv3 or its subsequent versions, you have an obligation to make the combined work to be licensed under the corresponding license, you can license such combined work under the license, provided that when you Distribute the combined work, you also provide a copy of this License to the recipients, and retain copyright, trademarks, patents, and disclaimer statements in the Contribution. No Contributor will grant additional rights to the recipients of the combined work for your license under AGPLv3 or its subsequent versions. - -7. Disclaimer of Warranty and Limitation of liability - -CONTRIBUTION ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE CONTRIBUTION, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -8. Language - -THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. - -END OF THE TERMS AND CONDITIONS - -How to apply the Mulan Public License,Version 2 (Mulan PubL v2), to your software - -To apply the Mulan Public License,Version 2 to your work, for easy identification by recipients, you are suggested to complete following three steps: - -Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; -Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package; -Attach the statement to the appropriate annotated syntax at the beginning of each source file. -Copyright (c) [Year] [name of copyright holder] -[Software Name] is licensed under Mulan PubL v2. -You can use this software according to the terms and conditions of the Mulan PubL v2. -You may obtain a copy of Mulan PubL v2 at: - http://license.coscl.org.cn/MulanPubL-2.0 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PubL v2 for more details. diff --git a/api/arceos_api/src/imp/display.rs b/api/arceos_api/src/imp/display.rs index 1abe25e59..ee031ecde 100644 --- a/api/arceos_api/src/imp/display.rs +++ b/api/arceos_api/src/imp/display.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + pub use axdisplay::DisplayInfo as AxDisplayInfo; /// Gets the framebuffer information. diff --git a/api/arceos_api/src/imp/fs.rs b/api/arceos_api/src/imp/fs.rs index fd7dac3ed..2aac0bf4b 100644 --- a/api/arceos_api/src/imp/fs.rs +++ b/api/arceos_api/src/imp/fs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::string::String; use axerrno::AxResult; use axfs::fops::{Directory, File}; diff --git a/api/arceos_api/src/imp/mem.rs b/api/arceos_api/src/imp/mem.rs index 3dd1ded12..46cefef47 100644 --- a/api/arceos_api/src/imp/mem.rs +++ b/api/arceos_api/src/imp/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + cfg_alloc! { use core::alloc::Layout; use core::ptr::NonNull; diff --git a/api/arceos_api/src/imp/mod.rs b/api/arceos_api/src/imp/mod.rs index 865fdc482..6f2acdeb1 100644 --- a/api/arceos_api/src/imp/mod.rs +++ b/api/arceos_api/src/imp/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod mem; mod task; diff --git a/api/arceos_api/src/imp/net.rs b/api/arceos_api/src/imp/net.rs index 88d4f7722..d7bf9a5ad 100644 --- a/api/arceos_api/src/imp/net.rs +++ b/api/arceos_api/src/imp/net.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::io::AxPollState; use axerrno::AxResult; use axnet::{UdpSocket, TcpSocket}; diff --git a/api/arceos_api/src/imp/task.rs b/api/arceos_api/src/imp/task.rs index e59c48384..03942553f 100644 --- a/api/arceos_api/src/imp/task.rs +++ b/api/arceos_api/src/imp/task.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + pub fn ax_sleep_until(deadline: crate::time::AxTimeValue) { #[cfg(feature = "multitask")] axtask::sleep_until(deadline); diff --git a/api/arceos_api/src/lib.rs b/api/arceos_api/src/lib.rs index 69fec6eaf..e728fc6e7 100644 --- a/api/arceos_api/src/lib.rs +++ b/api/arceos_api/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Public APIs and types for [ArceOS] modules //! //! [ArceOS]: https://github.com/rcore-os/arceos diff --git a/api/arceos_api/src/macros.rs b/api/arceos_api/src/macros.rs index 09ab1e23c..00843d6c5 100644 --- a/api/arceos_api/src/macros.rs +++ b/api/arceos_api/src/macros.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![allow(unused_macros)] macro_rules! define_api_type { diff --git a/api/arceos_posix_api/build.rs b/api/arceos_posix_api/build.rs index 3c9aa161b..46556bf37 100644 --- a/api/arceos_posix_api/build.rs +++ b/api/arceos_posix_api/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + fn main() { use std::io::Write; diff --git a/api/arceos_posix_api/ctypes.h b/api/arceos_posix_api/ctypes.h index 7d745f80d..b1131bced 100644 --- a/api/arceos_posix_api/ctypes.h +++ b/api/arceos_posix_api/ctypes.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/api/arceos_posix_api/src/imp/fd_ops.rs b/api/arceos_posix_api/src/imp/fd_ops.rs index 75ee61061..fbf4208d6 100644 --- a/api/arceos_posix_api/src/imp/fd_ops.rs +++ b/api/arceos_posix_api/src/imp/fd_ops.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use core::ffi::c_int; diff --git a/api/arceos_posix_api/src/imp/fs.rs b/api/arceos_posix_api/src/imp/fs.rs index 6c92f2da6..f5b73e65e 100644 --- a/api/arceos_posix_api/src/imp/fs.rs +++ b/api/arceos_posix_api/src/imp/fs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use core::ffi::{c_char, c_int}; diff --git a/api/arceos_posix_api/src/imp/io.rs b/api/arceos_posix_api/src/imp/io.rs index 269ce2035..1f30114d9 100644 --- a/api/arceos_posix_api/src/imp/io.rs +++ b/api/arceos_posix_api/src/imp/io.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::ctypes; use axerrno::LinuxError; use core::ffi::{c_int, c_void}; diff --git a/api/arceos_posix_api/src/imp/io_mpx/epoll.rs b/api/arceos_posix_api/src/imp/io_mpx/epoll.rs index 5404b2f13..5d5d092fd 100644 --- a/api/arceos_posix_api/src/imp/io_mpx/epoll.rs +++ b/api/arceos_posix_api/src/imp/io_mpx/epoll.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! `epoll` implementation. //! //! TODO: do not support `EPOLLET` flag diff --git a/api/arceos_posix_api/src/imp/io_mpx/mod.rs b/api/arceos_posix_api/src/imp/io_mpx/mod.rs index 397ed44f3..f0c44b0ab 100644 --- a/api/arceos_posix_api/src/imp/io_mpx/mod.rs +++ b/api/arceos_posix_api/src/imp/io_mpx/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! I/O multiplexing: //! //! * [`select`](select::sys_select) diff --git a/api/arceos_posix_api/src/imp/io_mpx/select.rs b/api/arceos_posix_api/src/imp/io_mpx/select.rs index 6986598b5..c6de0e49c 100644 --- a/api/arceos_posix_api/src/imp/io_mpx/select.rs +++ b/api/arceos_posix_api/src/imp/io_mpx/select.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; use axerrno::{LinuxError, LinuxResult}; diff --git a/api/arceos_posix_api/src/imp/mod.rs b/api/arceos_posix_api/src/imp/mod.rs index 603f934ba..ac0fe02aa 100644 --- a/api/arceos_posix_api/src/imp/mod.rs +++ b/api/arceos_posix_api/src/imp/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod stdio; pub mod io; diff --git a/api/arceos_posix_api/src/imp/net.rs b/api/arceos_posix_api/src/imp/net.rs index 861e4737b..4f66196e9 100644 --- a/api/arceos_posix_api/src/imp/net.rs +++ b/api/arceos_posix_api/src/imp/net.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::{sync::Arc, vec, vec::Vec}; use core::ffi::{c_char, c_int, c_void}; use core::mem::size_of; diff --git a/api/arceos_posix_api/src/imp/pipe.rs b/api/arceos_posix_api/src/imp/pipe.rs index 17a9b248b..7f7530151 100644 --- a/api/arceos_posix_api/src/imp/pipe.rs +++ b/api/arceos_posix_api/src/imp/pipe.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use core::ffi::c_int; diff --git a/api/arceos_posix_api/src/imp/pthread/mod.rs b/api/arceos_posix_api/src/imp/pthread/mod.rs index bcf12fff8..8bf9d8506 100644 --- a/api/arceos_posix_api/src/imp/pthread/mod.rs +++ b/api/arceos_posix_api/src/imp/pthread/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::{boxed::Box, collections::BTreeMap, sync::Arc}; use core::cell::UnsafeCell; use core::ffi::{c_int, c_void}; diff --git a/api/arceos_posix_api/src/imp/pthread/mutex.rs b/api/arceos_posix_api/src/imp/pthread/mutex.rs index f22a8f55d..3459ad2d2 100644 --- a/api/arceos_posix_api/src/imp/pthread/mutex.rs +++ b/api/arceos_posix_api/src/imp/pthread/mutex.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{ctypes, utils::check_null_mut_ptr}; use axerrno::LinuxResult; diff --git a/api/arceos_posix_api/src/imp/resources.rs b/api/arceos_posix_api/src/imp/resources.rs index 16956ae83..18aaf1bcf 100644 --- a/api/arceos_posix_api/src/imp/resources.rs +++ b/api/arceos_posix_api/src/imp/resources.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::ctypes; use axerrno::LinuxError; use core::ffi::c_int; diff --git a/api/arceos_posix_api/src/imp/stdio.rs b/api/arceos_posix_api/src/imp/stdio.rs index ded9c3333..9f541bd70 100644 --- a/api/arceos_posix_api/src/imp/stdio.rs +++ b/api/arceos_posix_api/src/imp/stdio.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axerrno::AxResult; use axio::{prelude::*, BufReader}; use axsync::Mutex; diff --git a/api/arceos_posix_api/src/imp/sys.rs b/api/arceos_posix_api/src/imp/sys.rs index 0e7a43292..81851c645 100644 --- a/api/arceos_posix_api/src/imp/sys.rs +++ b/api/arceos_posix_api/src/imp/sys.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::{c_int, c_long}; use crate::ctypes; diff --git a/api/arceos_posix_api/src/imp/task.rs b/api/arceos_posix_api/src/imp/task.rs index 5ba05feef..5b503231a 100644 --- a/api/arceos_posix_api/src/imp/task.rs +++ b/api/arceos_posix_api/src/imp/task.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; /// Relinquish the CPU, and switches to another task. diff --git a/api/arceos_posix_api/src/imp/time.rs b/api/arceos_posix_api/src/imp/time.rs index 56fa3a1fe..6845cce47 100644 --- a/api/arceos_posix_api/src/imp/time.rs +++ b/api/arceos_posix_api/src/imp/time.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axerrno::LinuxError; use core::ffi::{c_int, c_long}; use core::time::Duration; diff --git a/api/arceos_posix_api/src/lib.rs b/api/arceos_posix_api/src/lib.rs index 1e0e126e9..71d469dd4 100644 --- a/api/arceos_posix_api/src/lib.rs +++ b/api/arceos_posix_api/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! POSIX-compatible APIs for [ArceOS] modules //! //! [ArceOS]: https://github.com/rcore-os/arceos diff --git a/api/arceos_posix_api/src/utils.rs b/api/arceos_posix_api/src/utils.rs index 664bf5231..16384d531 100644 --- a/api/arceos_posix_api/src/utils.rs +++ b/api/arceos_posix_api/src/utils.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![allow(dead_code)] #![allow(unused_macros)] diff --git a/api/axfeat/src/lib.rs b/api/axfeat/src/lib.rs index 619285272..98a54dce9 100644 --- a/api/axfeat/src/lib.rs +++ b/api/axfeat/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Top-level feature selection for [ArceOS]. //! //! # Cargo Features diff --git a/apps/c/helloworld/main.c b/apps/c/helloworld/main.c index 0e5e7a80f..962a4324b 100644 --- a/apps/c/helloworld/main.c +++ b/apps/c/helloworld/main.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include int main() diff --git a/apps/c/httpclient/httpclient.c b/apps/c/httpclient/httpclient.c index 32ec77b58..3e642f9a8 100644 --- a/apps/c/httpclient/httpclient.c +++ b/apps/c/httpclient/httpclient.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/httpserver/httpserver.c b/apps/c/httpserver/httpserver.c index 4480785aa..0ed8a6653 100644 --- a/apps/c/httpserver/httpserver.c +++ b/apps/c/httpserver/httpserver.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/apps/c/memtest/memtest.c b/apps/c/memtest/memtest.c index 78cef5ca2..332303b7d 100644 --- a/apps/c/memtest/memtest.c +++ b/apps/c/memtest/memtest.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/pthread/basic/main.c b/apps/c/pthread/basic/main.c index cf697e903..b47a849d5 100644 --- a/apps/c/pthread/basic/main.c +++ b/apps/c/pthread/basic/main.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/pthread/parallel/main.c b/apps/c/pthread/parallel/main.c index d1dc9a2e1..4a1a320c7 100644 --- a/apps/c/pthread/parallel/main.c +++ b/apps/c/pthread/parallel/main.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/pthread/pipe/main.c b/apps/c/pthread/pipe/main.c index 3f7bedd4b..0bed653a1 100644 --- a/apps/c/pthread/pipe/main.c +++ b/apps/c/pthread/pipe/main.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/pthread/sleep/main.c b/apps/c/pthread/sleep/main.c index 2781e0dc3..4466fe049 100644 --- a/apps/c/pthread/sleep/main.c +++ b/apps/c/pthread/sleep/main.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/sqlite3/main.c b/apps/c/sqlite3/main.c index 49a9768e5..7bce887c4 100644 --- a/apps/c/sqlite3/main.c +++ b/apps/c/sqlite3/main.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/c/udpserver/udpserver.c b/apps/c/udpserver/udpserver.c index cff15139c..40bc6a8aa 100644 --- a/apps/c/udpserver/udpserver.c +++ b/apps/c/udpserver/udpserver.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/apps/display/src/display.rs b/apps/display/src/display.rs index 01601f198..d49f38dd6 100644 --- a/apps/display/src/display.rs +++ b/apps/display/src/display.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use embedded_graphics::pixelcolor::Rgb888; use embedded_graphics::prelude::{RgbColor, Size}; use embedded_graphics::{draw_target::DrawTarget, prelude::OriginDimensions}; diff --git a/apps/display/src/main.rs b/apps/display/src/main.rs index 8605e818f..8c6563ae3 100644 --- a/apps/display/src/main.rs +++ b/apps/display/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/exception/src/main.rs b/apps/exception/src/main.rs index e196cabd0..e643044d1 100644 --- a/apps/exception/src/main.rs +++ b/apps/exception/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/fs/shell/src/cmd.rs b/apps/fs/shell/src/cmd.rs index 23f087fe3..afef993e6 100644 --- a/apps/fs/shell/src/cmd.rs +++ b/apps/fs/shell/src/cmd.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::fs::{self, File, FileType}; use std::io::{self, prelude::*}; use std::{string::String, vec::Vec}; diff --git a/apps/fs/shell/src/main.rs b/apps/fs/shell/src/main.rs index 1e2875aad..a03a0aa01 100644 --- a/apps/fs/shell/src/main.rs +++ b/apps/fs/shell/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/fs/shell/src/ramfs.rs b/apps/fs/shell/src/ramfs.rs index 450cafaeb..3f0f83bb0 100644 --- a/apps/fs/shell/src/ramfs.rs +++ b/apps/fs/shell/src/ramfs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + extern crate alloc; use alloc::sync::Arc; diff --git a/apps/helloworld/src/main.rs b/apps/helloworld/src/main.rs index 97161c866..063695e16 100644 --- a/apps/helloworld/src/main.rs +++ b/apps/helloworld/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/memtest/src/main.rs b/apps/memtest/src/main.rs index e23e95e72..09bb65a1f 100644 --- a/apps/memtest/src/main.rs +++ b/apps/memtest/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/net/bwbench/src/main.rs b/apps/net/bwbench/src/main.rs index a69cdb000..6da76cbd8 100644 --- a/apps/net/bwbench/src/main.rs +++ b/apps/net/bwbench/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![no_std] #![no_main] diff --git a/apps/net/echoserver/src/main.rs b/apps/net/echoserver/src/main.rs index bff296b3d..3162e5d00 100644 --- a/apps/net/echoserver/src/main.rs +++ b/apps/net/echoserver/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/net/httpclient/src/main.rs b/apps/net/httpclient/src/main.rs index 6c81a5da0..c7877beef 100644 --- a/apps/net/httpclient/src/main.rs +++ b/apps/net/httpclient/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/net/httpserver/src/main.rs b/apps/net/httpserver/src/main.rs index a5943a909..4b1739abe 100644 --- a/apps/net/httpserver/src/main.rs +++ b/apps/net/httpserver/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Simple HTTP server. //! //! Benchmark with [Apache HTTP server benchmarking tool](https://httpd.apache.org/docs/2.4/programs/ab.html): diff --git a/apps/net/udpserver/src/main.rs b/apps/net/udpserver/src/main.rs index 54c2f9637..6b1751680 100644 --- a/apps/net/udpserver/src/main.rs +++ b/apps/net/udpserver/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/task/parallel/src/main.rs b/apps/task/parallel/src/main.rs index 2fe51c40c..aa3372501 100644 --- a/apps/task/parallel/src/main.rs +++ b/apps/task/parallel/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/task/priority/src/main.rs b/apps/task/priority/src/main.rs index ff013efd8..800e39bcf 100644 --- a/apps/task/priority/src/main.rs +++ b/apps/task/priority/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/task/sleep/src/main.rs b/apps/task/sleep/src/main.rs index 6cc4f0c2f..5d52e8695 100644 --- a/apps/task/sleep/src/main.rs +++ b/apps/task/sleep/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/apps/task/tls/src/main.rs b/apps/task/tls/src/main.rs index 07d870922..e9633e32e 100644 --- a/apps/task/tls/src/main.rs +++ b/apps/task/tls/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] #![feature(thread_local)] diff --git a/apps/task/yield/src/main.rs b/apps/task/yield/src/main.rs index f8cd27bf2..af579e072 100644 --- a/apps/task/yield/src/main.rs +++ b/apps/task/yield/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(feature = "axstd", no_std)] #![cfg_attr(feature = "axstd", no_main)] diff --git a/crates/allocator/benches/collections.rs b/crates/allocator/benches/collections.rs index c31fd84b4..184f0a6c9 100644 --- a/crates/allocator/benches/collections.rs +++ b/crates/allocator/benches/collections.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![feature(allocator_api)] #![feature(btreemap_alloc)] diff --git a/crates/allocator/benches/utils/mod.rs b/crates/allocator/benches/utils/mod.rs index 995e1535c..a7d3fff3b 100644 --- a/crates/allocator/benches/utils/mod.rs +++ b/crates/allocator/benches/utils/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::alloc::Layout; use std::ptr::NonNull; diff --git a/crates/allocator/src/bitmap.rs b/crates/allocator/src/bitmap.rs index 86018c73d..8b3a93332 100644 --- a/crates/allocator/src/bitmap.rs +++ b/crates/allocator/src/bitmap.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Bitmap allocation in page-granularity. //! //! TODO: adaptive size diff --git a/crates/allocator/src/buddy.rs b/crates/allocator/src/buddy.rs index 872f540a4..56480d24b 100644 --- a/crates/allocator/src/buddy.rs +++ b/crates/allocator/src/buddy.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Buddy memory allocation. //! //! TODO: more efficient diff --git a/crates/allocator/src/lib.rs b/crates/allocator/src/lib.rs index 5ced1b992..23fa3a18f 100644 --- a/crates/allocator/src/lib.rs +++ b/crates/allocator/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Various allocator algorithms in a unified interface. //! //! There are three types of allocators: diff --git a/crates/allocator/src/slab.rs b/crates/allocator/src/slab.rs index 17cb164b3..57d49a7f4 100644 --- a/crates/allocator/src/slab.rs +++ b/crates/allocator/src/slab.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Slab memory allocation. //! //! TODO: comments diff --git a/crates/allocator/src/tlsf.rs b/crates/allocator/src/tlsf.rs index 3d2cd99d9..5298ddf35 100644 --- a/crates/allocator/src/tlsf.rs +++ b/crates/allocator/src/tlsf.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! The TLSF (Two-Level Segregated Fit) dynamic memory allocation algorithm. //! //! This module wraps the implementation provided by the [rlsf] crate. diff --git a/crates/allocator/tests/allocator.rs b/crates/allocator/tests/allocator.rs index 58962b50d..fec7b1d96 100644 --- a/crates/allocator/tests/allocator.rs +++ b/crates/allocator/tests/allocator.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![feature(btreemap_alloc)] #![feature(allocator_api)] diff --git a/crates/arm_gic/src/gic_v2.rs b/crates/arm_gic/src/gic_v2.rs index 9db18f80a..bab3ca80b 100644 --- a/crates/arm_gic/src/gic_v2.rs +++ b/crates/arm_gic/src/gic_v2.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Types and definitions for GICv2. //! //! The official documentation: diff --git a/crates/arm_gic/src/lib.rs b/crates/arm_gic/src/lib.rs index 56e357873..f6dafc96d 100644 --- a/crates/arm_gic/src/lib.rs +++ b/crates/arm_gic/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! ARM Generic Interrupt Controller (GIC) register definitions and basic //! operations. diff --git a/crates/arm_pl011/src/lib.rs b/crates/arm_pl011/src/lib.rs index 60c062e4f..855a64ee5 100644 --- a/crates/arm_pl011/src/lib.rs +++ b/crates/arm_pl011/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Definitions for PL011 UART. #![no_std] diff --git a/crates/arm_pl011/src/pl011.rs b/crates/arm_pl011/src/pl011.rs index cdbb7a37b..2f79d201f 100644 --- a/crates/arm_pl011/src/pl011.rs +++ b/crates/arm_pl011/src/pl011.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Types and definitions for PL011 UART. //! //! The official documentation: diff --git a/crates/axerrno/build.rs b/crates/axerrno/build.rs index 51320f152..731c774a0 100644 --- a/crates/axerrno/build.rs +++ b/crates/axerrno/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::env; use std::fs::{self, File}; use std::io::{BufRead, BufReader, Result, Write}; diff --git a/crates/axerrno/src/errno.h b/crates/axerrno/src/errno.h index 581321174..871a74382 100644 --- a/crates/axerrno/src/errno.h +++ b/crates/axerrno/src/errno.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* Copy from /usr/include/asm-generic/errno-base.h and /usr/include/asm-generic/errno.h */ #ifndef _ASM_GENERIC_ERRNO_BASE_H diff --git a/crates/axerrno/src/lib.rs b/crates/axerrno/src/lib.rs index 986040cb4..fb276ef86 100644 --- a/crates/axerrno/src/lib.rs +++ b/crates/axerrno/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Error code definition used by [ArceOS](https://github.com/rcore-os/arceos). //! //! It provides two error types and the corresponding result types: diff --git a/crates/axfs_devfs/src/dir.rs b/crates/axfs_devfs/src/dir.rs index 69a6b8380..fbd62096c 100644 --- a/crates/axfs_devfs/src/dir.rs +++ b/crates/axfs_devfs/src/dir.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::collections::BTreeMap; use alloc::sync::{Arc, Weak}; use axfs_vfs::{VfsDirEntry, VfsNodeAttr, VfsNodeOps, VfsNodeRef, VfsNodeType}; diff --git a/crates/axfs_devfs/src/lib.rs b/crates/axfs_devfs/src/lib.rs index 3e6102374..9d3c53e4a 100644 --- a/crates/axfs_devfs/src/lib.rs +++ b/crates/axfs_devfs/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Device filesystem used by [ArceOS](https://github.com/rcore-os/arceos). //! //! The implementation is based on [`axfs_vfs`]. diff --git a/crates/axfs_devfs/src/null.rs b/crates/axfs_devfs/src/null.rs index a86eddb77..3e04a889a 100644 --- a/crates/axfs_devfs/src/null.rs +++ b/crates/axfs_devfs/src/null.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axfs_vfs::{VfsNodeAttr, VfsNodeOps, VfsNodePerm, VfsNodeType, VfsResult}; /// A null device behaves like `/dev/null`. diff --git a/crates/axfs_devfs/src/tests.rs b/crates/axfs_devfs/src/tests.rs index cfc6e9f1b..1e58cfaaa 100644 --- a/crates/axfs_devfs/src/tests.rs +++ b/crates/axfs_devfs/src/tests.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::sync::Arc; use axfs_vfs::{VfsError, VfsNodeType, VfsResult}; diff --git a/crates/axfs_devfs/src/zero.rs b/crates/axfs_devfs/src/zero.rs index 0f89fd132..991cf74ed 100644 --- a/crates/axfs_devfs/src/zero.rs +++ b/crates/axfs_devfs/src/zero.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axfs_vfs::{VfsNodeAttr, VfsNodeOps, VfsNodePerm, VfsNodeType, VfsResult}; /// A zero device behaves like `/dev/zero`. diff --git a/crates/axfs_ramfs/src/dir.rs b/crates/axfs_ramfs/src/dir.rs index b64707e84..8b98fe734 100644 --- a/crates/axfs_ramfs/src/dir.rs +++ b/crates/axfs_ramfs/src/dir.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::collections::BTreeMap; use alloc::sync::{Arc, Weak}; use alloc::{string::String, vec::Vec}; diff --git a/crates/axfs_ramfs/src/file.rs b/crates/axfs_ramfs/src/file.rs index b378ee7cf..0df8c8ca6 100644 --- a/crates/axfs_ramfs/src/file.rs +++ b/crates/axfs_ramfs/src/file.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::vec::Vec; use axfs_vfs::{impl_vfs_non_dir_default, VfsNodeAttr, VfsNodeOps, VfsResult}; use spin::RwLock; diff --git a/crates/axfs_ramfs/src/lib.rs b/crates/axfs_ramfs/src/lib.rs index 4d57ecaf5..a8bf60c38 100644 --- a/crates/axfs_ramfs/src/lib.rs +++ b/crates/axfs_ramfs/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! RAM filesystem used by [ArceOS](https://github.com/rcore-os/arceos). //! //! The implementation is based on [`axfs_vfs`]. diff --git a/crates/axfs_ramfs/src/tests.rs b/crates/axfs_ramfs/src/tests.rs index fda7001d5..eb3115564 100644 --- a/crates/axfs_ramfs/src/tests.rs +++ b/crates/axfs_ramfs/src/tests.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::sync::Arc; use axfs_vfs::{VfsError, VfsNodeType, VfsResult}; diff --git a/crates/axfs_vfs/src/lib.rs b/crates/axfs_vfs/src/lib.rs index ee807a812..77af729b1 100644 --- a/crates/axfs_vfs/src/lib.rs +++ b/crates/axfs_vfs/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Virtual filesystem interfaces used by [ArceOS](https://github.com/rcore-os/arceos). //! //! A filesystem is a set of files and directories (symbol links are not diff --git a/crates/axfs_vfs/src/macros.rs b/crates/axfs_vfs/src/macros.rs index 4cfd24da2..c11c14ff8 100644 --- a/crates/axfs_vfs/src/macros.rs +++ b/crates/axfs_vfs/src/macros.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /// When implement [`VfsNodeOps`] on a directory node, add dummy file operations /// that just return an error. /// diff --git a/crates/axfs_vfs/src/path.rs b/crates/axfs_vfs/src/path.rs index 273c5b00c..321a75068 100644 --- a/crates/axfs_vfs/src/path.rs +++ b/crates/axfs_vfs/src/path.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Utilities for path manipulation. use alloc::string::String; diff --git a/crates/axfs_vfs/src/structs.rs b/crates/axfs_vfs/src/structs.rs index 9d0dbfaba..ee26c83de 100644 --- a/crates/axfs_vfs/src/structs.rs +++ b/crates/axfs_vfs/src/structs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /// Filesystem attributes. /// /// Currently not used. diff --git a/crates/axio/src/buffered/bufreader.rs b/crates/axio/src/buffered/bufreader.rs index b466c1e89..4be7af425 100644 --- a/crates/axio/src/buffered/bufreader.rs +++ b/crates/axio/src/buffered/bufreader.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{BufRead, Read, Result}; #[cfg(feature = "alloc")] diff --git a/crates/axio/src/buffered/mod.rs b/crates/axio/src/buffered/mod.rs index c7dfe1ea6..eadd8e11a 100644 --- a/crates/axio/src/buffered/mod.rs +++ b/crates/axio/src/buffered/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod bufreader; pub use self::bufreader::BufReader; diff --git a/crates/axio/src/error.rs b/crates/axio/src/error.rs index ee2d716b1..6a30cb171 100644 --- a/crates/axio/src/error.rs +++ b/crates/axio/src/error.rs @@ -1,2 +1,11 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + pub use axerrno::AxError as Error; pub use axerrno::AxResult as Result; diff --git a/crates/axio/src/impls.rs b/crates/axio/src/impls.rs index 96f83db0f..cc81f35cb 100644 --- a/crates/axio/src/impls.rs +++ b/crates/axio/src/impls.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{prelude::*, Result}; use core::cmp; diff --git a/crates/axio/src/lib.rs b/crates/axio/src/lib.rs index b15c80ae7..6d5f3b16b 100644 --- a/crates/axio/src/lib.rs +++ b/crates/axio/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [`std::io`]-like I/O traits for `no_std` environment. #![cfg_attr(not(doc), no_std)] diff --git a/crates/axio/src/prelude.rs b/crates/axio/src/prelude.rs index 9f8020c3d..33b6bfaca 100644 --- a/crates/axio/src/prelude.rs +++ b/crates/axio/src/prelude.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! The I/O Prelude. //! //! The purpose of this module is to alleviate imports of many common I/O traits diff --git a/crates/capability/src/lib.rs b/crates/capability/src/lib.rs index 6ac23247e..9ee6db256 100644 --- a/crates/capability/src/lib.rs +++ b/crates/capability/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Provide basic [capability-based security]. //! //! The wrapper type [`WithCap`] associates a **capability** to an object, that diff --git a/crates/crate_interface/src/lib.rs b/crates/crate_interface/src/lib.rs index adc2621de..d6298945e 100644 --- a/crates/crate_interface/src/lib.rs +++ b/crates/crate_interface/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![doc = include_str!("../README.md")] #![feature(iter_next_chunk)] diff --git a/crates/crate_interface/tests/test_crate_interface.rs b/crates/crate_interface/tests/test_crate_interface.rs index 2c616eafd..12a9c0bfd 100644 --- a/crates/crate_interface/tests/test_crate_interface.rs +++ b/crates/crate_interface/tests/test_crate_interface.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate_interface::*; #[def_interface] diff --git a/crates/driver_block/src/bcm2835sdhci.rs b/crates/driver_block/src/bcm2835sdhci.rs index 412a800f0..400005dad 100644 --- a/crates/driver_block/src/bcm2835sdhci.rs +++ b/crates/driver_block/src/bcm2835sdhci.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! SD card driver for raspi4 extern crate alloc; diff --git a/crates/driver_block/src/lib.rs b/crates/driver_block/src/lib.rs index f2ae63cec..aa59c9191 100644 --- a/crates/driver_block/src/lib.rs +++ b/crates/driver_block/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Common traits and types for block storage device drivers (i.e. disk). #![no_std] diff --git a/crates/driver_block/src/ramdisk.rs b/crates/driver_block/src/ramdisk.rs index 2e240c787..efddf134d 100644 --- a/crates/driver_block/src/ramdisk.rs +++ b/crates/driver_block/src/ramdisk.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Mock block devices that store data in RAM. extern crate alloc; diff --git a/crates/driver_common/src/lib.rs b/crates/driver_common/src/lib.rs index c249b9883..b6f31ee42 100644 --- a/crates/driver_common/src/lib.rs +++ b/crates/driver_common/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Device driver interfaces used by [ArceOS][1]. It provides common traits and //! types for implementing a device driver. //! diff --git a/crates/driver_display/src/lib.rs b/crates/driver_display/src/lib.rs index 5ad32b4da..139189540 100644 --- a/crates/driver_display/src/lib.rs +++ b/crates/driver_display/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Common traits and types for graphics display device drivers. #![no_std] diff --git a/crates/driver_net/src/ixgbe.rs b/crates/driver_net/src/ixgbe.rs index b6a2c1b3a..4daacf992 100644 --- a/crates/driver_net/src/ixgbe.rs +++ b/crates/driver_net/src/ixgbe.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::convert::From; use core::{mem::ManuallyDrop, ptr::NonNull}; diff --git a/crates/driver_net/src/lib.rs b/crates/driver_net/src/lib.rs index 0f9c9ed36..95f021a6a 100644 --- a/crates/driver_net/src/lib.rs +++ b/crates/driver_net/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Common traits and types for network device (NIC) drivers. #![no_std] diff --git a/crates/driver_net/src/net_buf.rs b/crates/driver_net/src/net_buf.rs index 657674938..035c097c9 100644 --- a/crates/driver_net/src/net_buf.rs +++ b/crates/driver_net/src/net_buf.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + extern crate alloc; use crate::{DevError, DevResult, NetBufPtr}; diff --git a/crates/driver_pci/src/lib.rs b/crates/driver_pci/src/lib.rs index 4ae0b9b97..fd396fff2 100644 --- a/crates/driver_pci/src/lib.rs +++ b/crates/driver_pci/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Structures and functions for PCI bus operations. //! //! Currently, it just re-exports structures from the crate [virtio-drivers][1] diff --git a/crates/driver_virtio/src/blk.rs b/crates/driver_virtio/src/blk.rs index 3edaa1a08..f8811130f 100644 --- a/crates/driver_virtio/src/blk.rs +++ b/crates/driver_virtio/src/blk.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::as_dev_err; use driver_block::BlockDriverOps; use driver_common::{BaseDriverOps, DevResult, DeviceType}; diff --git a/crates/driver_virtio/src/gpu.rs b/crates/driver_virtio/src/gpu.rs index 1acc68841..f59605eae 100644 --- a/crates/driver_virtio/src/gpu.rs +++ b/crates/driver_virtio/src/gpu.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + extern crate alloc; use crate::as_dev_err; diff --git a/crates/driver_virtio/src/lib.rs b/crates/driver_virtio/src/lib.rs index 98bb5f30c..c22b6452f 100644 --- a/crates/driver_virtio/src/lib.rs +++ b/crates/driver_virtio/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Wrappers of some devices in the [`virtio-drivers`][1] crate, that implement //! traits in the [`driver_common`][2] series crates. //! diff --git a/crates/driver_virtio/src/net.rs b/crates/driver_virtio/src/net.rs index e106f7e53..8c7849ccd 100644 --- a/crates/driver_virtio/src/net.rs +++ b/crates/driver_virtio/src/net.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::as_dev_err; use alloc::{sync::Arc, vec::Vec}; use driver_common::{BaseDriverOps, DevError, DevResult, DeviceType}; diff --git a/crates/dw_apb_uart/src/lib.rs b/crates/dw_apb_uart/src/lib.rs index 069f07961..99f06911b 100644 --- a/crates/dw_apb_uart/src/lib.rs +++ b/crates/dw_apb_uart/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Definitions for snps,dw-apb-uart serial driver. //! Uart snps,dw-apb-uart driver in Rust for BST A1000b FADA board. #![no_std] diff --git a/crates/flatten_objects/src/lib.rs b/crates/flatten_objects/src/lib.rs index d5637f001..74a5f0702 100644 --- a/crates/flatten_objects/src/lib.rs +++ b/crates/flatten_objects/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [`FlattenObjects`] is a container that stores numbered objects. //! //! Objects can be added to the [`FlattenObjects`], a unique ID will be assigned diff --git a/crates/handler_table/src/lib.rs b/crates/handler_table/src/lib.rs index becd784ba..a3eb7af1b 100644 --- a/crates/handler_table/src/lib.rs +++ b/crates/handler_table/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![no_std] #![doc = include_str!("../README.md")] diff --git a/crates/kernel_guard/src/arch/aarch64.rs b/crates/kernel_guard/src/arch/aarch64.rs index 554dd09b8..d7d89334b 100644 --- a/crates/kernel_guard/src/arch/aarch64.rs +++ b/crates/kernel_guard/src/arch/aarch64.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::asm; #[inline] diff --git a/crates/kernel_guard/src/arch/mod.rs b/crates/kernel_guard/src/arch/mod.rs index 3a0514972..b88326d68 100644 --- a/crates/kernel_guard/src/arch/mod.rs +++ b/crates/kernel_guard/src/arch/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg_attr(not(target_os = "none"), allow(dead_code))] cfg_if::cfg_if! { diff --git a/crates/kernel_guard/src/arch/riscv.rs b/crates/kernel_guard/src/arch/riscv.rs index 5e73c6384..eecad89d5 100644 --- a/crates/kernel_guard/src/arch/riscv.rs +++ b/crates/kernel_guard/src/arch/riscv.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::asm; /// Bit 1: Supervisor Interrupt Enable diff --git a/crates/kernel_guard/src/arch/x86.rs b/crates/kernel_guard/src/arch/x86.rs index 0520a02bc..b33a542c2 100644 --- a/crates/kernel_guard/src/arch/x86.rs +++ b/crates/kernel_guard/src/arch/x86.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::asm; /// Interrupt Enable Flag (IF) diff --git a/crates/kernel_guard/src/lib.rs b/crates/kernel_guard/src/lib.rs index 97e6a8b06..fbbd43b20 100644 --- a/crates/kernel_guard/src/lib.rs +++ b/crates/kernel_guard/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! RAII wrappers to create a critical section with local IRQs or preemption //! disabled, used to implement spin locks in kernel. //! diff --git a/crates/lazy_init/src/lib.rs b/crates/lazy_init/src/lib.rs index b2f2e0d29..a4b09e553 100644 --- a/crates/lazy_init/src/lib.rs +++ b/crates/lazy_init/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A wrapper for lazy initialized values. //! //! Unlike [`lazy_static`][1], this crate does not provide concurrency safety. diff --git a/crates/linked_list/src/lib.rs b/crates/linked_list/src/lib.rs index 9fb264ea0..19a4678cf 100644 --- a/crates/linked_list/src/lib.rs +++ b/crates/linked_list/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Linked lists that supports arbitrary removal in constant time. //! //! It is based on the linked list implementation in [Rust-for-Linux][1]. diff --git a/crates/linked_list/src/linked_list.rs b/crates/linked_list/src/linked_list.rs index 0c188038a..5eaf79b2c 100644 --- a/crates/linked_list/src/linked_list.rs +++ b/crates/linked_list/src/linked_list.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + // SPDX-License-Identifier: GPL-2.0 //! Linked lists. diff --git a/crates/linked_list/src/unsafe_list.rs b/crates/linked_list/src/unsafe_list.rs index 68fe46cb4..d3c92e047 100644 --- a/crates/linked_list/src/unsafe_list.rs +++ b/crates/linked_list/src/unsafe_list.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + // SPDX-License-Identifier: GPL-2.0 //! Intrusive circular doubly-linked lists. diff --git a/crates/memory_addr/src/lib.rs b/crates/memory_addr/src/lib.rs index 4a73609da..e2fae64ec 100644 --- a/crates/memory_addr/src/lib.rs +++ b/crates/memory_addr/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![no_std] #![feature(const_mut_refs)] #![doc = include_str!("../README.md")] diff --git a/crates/page_table/src/arch/aarch64.rs b/crates/page_table/src/arch/aarch64.rs index e652544ba..e2c71e070 100644 --- a/crates/page_table/src/arch/aarch64.rs +++ b/crates/page_table/src/arch/aarch64.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! AArch64 specific page table structures. use crate::{PageTable64, PagingMetaData}; diff --git a/crates/page_table/src/arch/mod.rs b/crates/page_table/src/arch/mod.rs index 13fff18b9..18eddeaff 100644 --- a/crates/page_table/src/arch/mod.rs +++ b/crates/page_table/src/arch/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[cfg(any(target_arch = "x86_64", doc))] pub mod x86_64; diff --git a/crates/page_table/src/arch/riscv.rs b/crates/page_table/src/arch/riscv.rs index 6c15678b9..db4f5cd01 100644 --- a/crates/page_table/src/arch/riscv.rs +++ b/crates/page_table/src/arch/riscv.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! RISC-V specific page table structures. use crate::{PageTable64, PagingMetaData}; diff --git a/crates/page_table/src/arch/x86_64.rs b/crates/page_table/src/arch/x86_64.rs index 627f8f4ab..dfa735f32 100644 --- a/crates/page_table/src/arch/x86_64.rs +++ b/crates/page_table/src/arch/x86_64.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! x86 specific page table structures. use crate::{PageTable64, PagingMetaData}; diff --git a/crates/page_table/src/bits64.rs b/crates/page_table/src/bits64.rs index dee0d9d4f..4de002008 100644 --- a/crates/page_table/src/bits64.rs +++ b/crates/page_table/src/bits64.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + extern crate alloc; use alloc::{vec, vec::Vec}; diff --git a/crates/page_table/src/lib.rs b/crates/page_table/src/lib.rs index 0af664994..f5e95c45e 100644 --- a/crates/page_table/src/lib.rs +++ b/crates/page_table/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! This crate provides generic, unified, architecture-independent, and OS-free //! page table structures for various hardware architectures. //! diff --git a/crates/page_table_entry/src/arch/aarch64.rs b/crates/page_table_entry/src/arch/aarch64.rs index 5b88b97ec..5336ace80 100644 --- a/crates/page_table_entry/src/arch/aarch64.rs +++ b/crates/page_table_entry/src/arch/aarch64.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! AArch64 VMSAv8-64 translation table format descriptors. use aarch64_cpu::registers::MAIR_EL1; diff --git a/crates/page_table_entry/src/arch/mod.rs b/crates/page_table_entry/src/arch/mod.rs index 9491f9539..c48c80499 100644 --- a/crates/page_table_entry/src/arch/mod.rs +++ b/crates/page_table_entry/src/arch/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[cfg(target_arch = "x86_64")] pub mod x86_64; diff --git a/crates/page_table_entry/src/arch/riscv.rs b/crates/page_table_entry/src/arch/riscv.rs index 16c9fc592..4848753a5 100644 --- a/crates/page_table_entry/src/arch/riscv.rs +++ b/crates/page_table_entry/src/arch/riscv.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! RISC-V page table entries. use core::fmt; diff --git a/crates/page_table_entry/src/arch/x86_64.rs b/crates/page_table_entry/src/arch/x86_64.rs index 9ae024c58..1761f89a1 100644 --- a/crates/page_table_entry/src/arch/x86_64.rs +++ b/crates/page_table_entry/src/arch/x86_64.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! x86 page table entries on 64-bit paging. use core::fmt; diff --git a/crates/page_table_entry/src/lib.rs b/crates/page_table_entry/src/lib.rs index bd1a269de..f760286a9 100644 --- a/crates/page_table_entry/src/lib.rs +++ b/crates/page_table_entry/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! This crate provides the definition of page table entry for various hardware //! architectures. //! diff --git a/crates/percpu/build.rs b/crates/percpu/build.rs index 187ba3ff4..89ff09cc3 100644 --- a/crates/percpu/build.rs +++ b/crates/percpu/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::path::Path; fn main() { diff --git a/crates/percpu/src/imp.rs b/crates/percpu/src/imp.rs index 322867b71..a29ac6429 100644 --- a/crates/percpu/src/imp.rs +++ b/crates/percpu/src/imp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + const fn align_up(val: usize) -> usize { const PAGE_SIZE: usize = 0x1000; (val + PAGE_SIZE - 1) & !(PAGE_SIZE - 1) diff --git a/crates/percpu/src/lib.rs b/crates/percpu/src/lib.rs index 9867bc6d0..6bf478089 100644 --- a/crates/percpu/src/lib.rs +++ b/crates/percpu/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Define and access per-CPU data structures. //! //! All per-CPU data is placed into several contiguous memory regions called diff --git a/crates/percpu/src/naive.rs b/crates/percpu/src/naive.rs index 0c9086c2d..4e4f00bd4 100644 --- a/crates/percpu/src/naive.rs +++ b/crates/percpu/src/naive.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /// No effect for "sp-naive" use. pub fn init(_max_cpu_num: usize) {} diff --git a/crates/percpu/tests/test_percpu.rs b/crates/percpu/tests/test_percpu.rs index 13abbe771..57ec12ae5 100644 --- a/crates/percpu/tests/test_percpu.rs +++ b/crates/percpu/tests/test_percpu.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg(not(target_os = "macos"))] use percpu::*; diff --git a/crates/percpu_macros/src/arch.rs b/crates/percpu_macros/src/arch.rs index 6d77eb681..742b0ac0a 100644 --- a/crates/percpu_macros/src/arch.rs +++ b/crates/percpu_macros/src/arch.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use quote::{format_ident, quote}; use syn::{Ident, Type}; diff --git a/crates/percpu_macros/src/lib.rs b/crates/percpu_macros/src/lib.rs index 6daeeaa90..0250d9352 100644 --- a/crates/percpu_macros/src/lib.rs +++ b/crates/percpu_macros/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Macros to define and access a per-CPU data structure. //! //! **DO NOT** use this crate directly. Use the [percpu] crate instead. diff --git a/crates/percpu_macros/src/naive.rs b/crates/percpu_macros/src/naive.rs index 0ebf77036..89bd27e7e 100644 --- a/crates/percpu_macros/src/naive.rs +++ b/crates/percpu_macros/src/naive.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! For single CPU use, we just make the per-CPU data a global variable. use quote::quote; diff --git a/crates/ratio/src/lib.rs b/crates/ratio/src/lib.rs index 5ae5383b0..978db829d 100644 --- a/crates/ratio/src/lib.rs +++ b/crates/ratio/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! The type of ratios and related operations. //! //! A **ratio** is the result of dividing two integers, i.e., the numerator and diff --git a/crates/scheduler/src/cfs.rs b/crates/scheduler/src/cfs.rs index 30043aacf..92644ae3d 100644 --- a/crates/scheduler/src/cfs.rs +++ b/crates/scheduler/src/cfs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::{collections::BTreeMap, sync::Arc}; use core::ops::Deref; use core::sync::atomic::{AtomicIsize, Ordering}; diff --git a/crates/scheduler/src/fifo.rs b/crates/scheduler/src/fifo.rs index f2469e5c5..cf502b925 100644 --- a/crates/scheduler/src/fifo.rs +++ b/crates/scheduler/src/fifo.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use core::ops::Deref; diff --git a/crates/scheduler/src/lib.rs b/crates/scheduler/src/lib.rs index 28f055a53..4350c07b2 100644 --- a/crates/scheduler/src/lib.rs +++ b/crates/scheduler/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Various scheduler algorithms in a unified interface. //! //! Currently supported algorithms: diff --git a/crates/scheduler/src/round_robin.rs b/crates/scheduler/src/round_robin.rs index bf7e2c4d2..a8dd71e03 100644 --- a/crates/scheduler/src/round_robin.rs +++ b/crates/scheduler/src/round_robin.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::{collections::VecDeque, sync::Arc}; use core::ops::Deref; use core::sync::atomic::{AtomicIsize, Ordering}; diff --git a/crates/scheduler/src/tests.rs b/crates/scheduler/src/tests.rs index 472820cae..a798a3011 100644 --- a/crates/scheduler/src/tests.rs +++ b/crates/scheduler/src/tests.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + macro_rules! def_test_sched { ($name: ident, $scheduler: ty, $task: ty) => { mod $name { diff --git a/crates/slab_allocator/src/lib.rs b/crates/slab_allocator/src/lib.rs index 4f006b41d..61b35f40d 100644 --- a/crates/slab_allocator/src/lib.rs +++ b/crates/slab_allocator/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Slab allocator for `no_std` systems. It uses multiple slabs with blocks of //! different sizes and a [buddy_system_allocator] for blocks larger than 4096 //! bytes. diff --git a/crates/slab_allocator/src/slab.rs b/crates/slab_allocator/src/slab.rs index 0060c8c73..1d85e535a 100644 --- a/crates/slab_allocator/src/slab.rs +++ b/crates/slab_allocator/src/slab.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use super::SET_SIZE; use alloc::alloc::{AllocError, Layout}; diff --git a/crates/slab_allocator/src/tests.rs b/crates/slab_allocator/src/tests.rs index e0a5a14a5..c1daf1916 100644 --- a/crates/slab_allocator/src/tests.rs +++ b/crates/slab_allocator/src/tests.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use super::*; use alloc::alloc::Layout; use core::mem::{align_of, size_of}; diff --git a/crates/spinlock/src/base.rs b/crates/spinlock/src/base.rs index dc00880f7..389a5534a 100644 --- a/crates/spinlock/src/base.rs +++ b/crates/spinlock/src/base.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A naïve spinning mutex. //! //! Waiting threads hammer an atomic variable until it becomes available. Best-case latency is low, but worst-case diff --git a/crates/spinlock/src/lib.rs b/crates/spinlock/src/lib.rs index ad961d570..e7ff22f22 100644 --- a/crates/spinlock/src/lib.rs +++ b/crates/spinlock/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! `no_std` spin lock implementation that can disable kernel local IRQs or //! preemption while locking. //! diff --git a/crates/timer_list/src/lib.rs b/crates/timer_list/src/lib.rs index b73f84868..33b083060 100644 --- a/crates/timer_list/src/lib.rs +++ b/crates/timer_list/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A list of timed events that will be triggered sequentially when the timer //! expires. //! diff --git a/crates/tuple_for_each/src/lib.rs b/crates/tuple_for_each/src/lib.rs index fa361d09f..6a8505ec7 100644 --- a/crates/tuple_for_each/src/lib.rs +++ b/crates/tuple_for_each/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Provides macros and methods to iterate over the fields of a tuple struct. //! //! Added methods: diff --git a/crates/tuple_for_each/tests/test_tuple_for_each.rs b/crates/tuple_for_each/tests/test_tuple_for_each.rs index 4f194c737..f39c943a2 100644 --- a/crates/tuple_for_each/tests/test_tuple_for_each.rs +++ b/crates/tuple_for_each/tests/test_tuple_for_each.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use tuple_for_each::*; trait Base { diff --git a/modules/axalloc/src/lib.rs b/modules/axalloc/src/lib.rs index 096ce95ae..27a0cea31 100644 --- a/modules/axalloc/src/lib.rs +++ b/modules/axalloc/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) global memory allocator. //! //! It provides [`GlobalAllocator`], which implements the trait diff --git a/modules/axalloc/src/page.rs b/modules/axalloc/src/page.rs index f4a69129b..8611a7051 100644 --- a/modules/axalloc/src/page.rs +++ b/modules/axalloc/src/page.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use allocator::AllocError; use axerrno::{AxError, AxResult}; use memory_addr::{PhysAddr, VirtAddr}; diff --git a/modules/axconfig/build.rs b/modules/axconfig/build.rs index 4949a00b5..e29437914 100644 --- a/modules/axconfig/build.rs +++ b/modules/axconfig/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::io::{Result, Write}; use std::path::{Path, PathBuf}; use toml_edit::{Decor, Document, Item, Table, Value}; diff --git a/modules/axconfig/src/lib.rs b/modules/axconfig/src/lib.rs index 8705b803f..9dedc41fd 100644 --- a/modules/axconfig/src/lib.rs +++ b/modules/axconfig/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Platform-specific constants and parameters for [ArceOS]. //! //! Currently supported platforms can be found in the [platforms] directory of diff --git a/modules/axdisplay/src/lib.rs b/modules/axdisplay/src/lib.rs index 26dc42240..1ec45d639 100644 --- a/modules/axdisplay/src/lib.rs +++ b/modules/axdisplay/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) graphics module. //! //! Currently only supports direct writing to the framebuffer. diff --git a/modules/axdriver/build.rs b/modules/axdriver/build.rs index d418d5ec1..1306fb30a 100644 --- a/modules/axdriver/build.rs +++ b/modules/axdriver/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + const NET_DEV_FEATURES: &[&str] = &["ixgbe", "virtio-net"]; const BLOCK_DEV_FEATURES: &[&str] = &["ramdisk", "bcm2835-sdhci", "virtio-blk"]; const DISPLAY_DEV_FEATURES: &[&str] = &["virtio-gpu"]; diff --git a/modules/axdriver/src/bus/mmio.rs b/modules/axdriver/src/bus/mmio.rs index 5a3573a6a..8253e3ac2 100644 --- a/modules/axdriver/src/bus/mmio.rs +++ b/modules/axdriver/src/bus/mmio.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[allow(unused_imports)] use crate::{prelude::*, AllDevices}; diff --git a/modules/axdriver/src/bus/mod.rs b/modules/axdriver/src/bus/mod.rs index bc7f80f5a..abad3c9b4 100644 --- a/modules/axdriver/src/bus/mod.rs +++ b/modules/axdriver/src/bus/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[cfg(bus = "mmio")] mod mmio; #[cfg(bus = "pci")] diff --git a/modules/axdriver/src/bus/pci.rs b/modules/axdriver/src/bus/pci.rs index f47b2757e..585cfa131 100644 --- a/modules/axdriver/src/bus/pci.rs +++ b/modules/axdriver/src/bus/pci.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{prelude::*, AllDevices}; use axhal::mem::phys_to_virt; use driver_pci::{ diff --git a/modules/axdriver/src/drivers.rs b/modules/axdriver/src/drivers.rs index 5ee6dcacd..b5cc5174c 100644 --- a/modules/axdriver/src/drivers.rs +++ b/modules/axdriver/src/drivers.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Defines types and probe methods of all supported devices. #![allow(unused_imports)] diff --git a/modules/axdriver/src/dummy.rs b/modules/axdriver/src/dummy.rs index 7a02fb024..60e293538 100644 --- a/modules/axdriver/src/dummy.rs +++ b/modules/axdriver/src/dummy.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Dummy types used if no device of a certain category is selected. #![allow(unused_imports)] diff --git a/modules/axdriver/src/ixgbe.rs b/modules/axdriver/src/ixgbe.rs index 34d926719..06249aa39 100644 --- a/modules/axdriver/src/ixgbe.rs +++ b/modules/axdriver/src/ixgbe.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axalloc::global_allocator; use axhal::mem::{phys_to_virt, virt_to_phys}; use core::{alloc::Layout, ptr::NonNull}; diff --git a/modules/axdriver/src/lib.rs b/modules/axdriver/src/lib.rs index 05b5d9852..18cc17fd3 100644 --- a/modules/axdriver/src/lib.rs +++ b/modules/axdriver/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) device drivers. //! //! # Usage diff --git a/modules/axdriver/src/macros.rs b/modules/axdriver/src/macros.rs index b90e813e7..c079f7db5 100644 --- a/modules/axdriver/src/macros.rs +++ b/modules/axdriver/src/macros.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! TODO: generate registered drivers in `for_each_drivers!` automatically. #![allow(unused_macros)] diff --git a/modules/axdriver/src/prelude.rs b/modules/axdriver/src/prelude.rs index d41f7fb81..ad05161f4 100644 --- a/modules/axdriver/src/prelude.rs +++ b/modules/axdriver/src/prelude.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Device driver prelude that includes some traits and types. pub use driver_common::{BaseDriverOps, DevError, DevResult, DeviceType}; diff --git a/modules/axdriver/src/structs/dyn.rs b/modules/axdriver/src/structs/dyn.rs index c4d04cb97..4b3cf6cef 100644 --- a/modules/axdriver/src/structs/dyn.rs +++ b/modules/axdriver/src/structs/dyn.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![allow(unused_imports)] use crate::prelude::*; diff --git a/modules/axdriver/src/structs/mod.rs b/modules/axdriver/src/structs/mod.rs index d373100fb..9a5253cb0 100644 --- a/modules/axdriver/src/structs/mod.rs +++ b/modules/axdriver/src/structs/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[cfg_attr(feature = "dyn", path = "dyn.rs")] #[cfg_attr(not(feature = "dyn"), path = "static.rs")] mod imp; diff --git a/modules/axdriver/src/structs/static.rs b/modules/axdriver/src/structs/static.rs index 9adff2c24..81e684359 100644 --- a/modules/axdriver/src/structs/static.rs +++ b/modules/axdriver/src/structs/static.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[cfg(feature = "block")] pub use crate::drivers::AxBlockDevice; #[cfg(feature = "display")] diff --git a/modules/axdriver/src/virtio.rs b/modules/axdriver/src/virtio.rs index 42999b05a..2b6d1d006 100644 --- a/modules/axdriver/src/virtio.rs +++ b/modules/axdriver/src/virtio.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::marker::PhantomData; use core::ptr::NonNull; diff --git a/modules/axfs/src/api/dir.rs b/modules/axfs/src/api/dir.rs index 55ad5ab32..4ef49859a 100644 --- a/modules/axfs/src/api/dir.rs +++ b/modules/axfs/src/api/dir.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::string::String; use axio::Result; use core::fmt; diff --git a/modules/axfs/src/api/file.rs b/modules/axfs/src/api/file.rs index 6941c90cb..0236597f7 100644 --- a/modules/axfs/src/api/file.rs +++ b/modules/axfs/src/api/file.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axio::{prelude::*, Result, SeekFrom}; use core::fmt; diff --git a/modules/axfs/src/api/mod.rs b/modules/axfs/src/api/mod.rs index c8fb3aa30..a018b1354 100644 --- a/modules/axfs/src/api/mod.rs +++ b/modules/axfs/src/api/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [`std::fs`]-like high-level filesystem manipulation operations. mod dir; diff --git a/modules/axfs/src/dev.rs b/modules/axfs/src/dev.rs index 47cc2d2f3..8f0e3dfab 100644 --- a/modules/axfs/src/dev.rs +++ b/modules/axfs/src/dev.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axdriver::prelude::*; const BLOCK_SIZE: usize = 512; diff --git a/modules/axfs/src/fops.rs b/modules/axfs/src/fops.rs index dea021e2a..b2058bf3c 100644 --- a/modules/axfs/src/fops.rs +++ b/modules/axfs/src/fops.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Low-level filesystem operations. use axerrno::{ax_err, ax_err_type, AxResult}; diff --git a/modules/axfs/src/fs/fatfs.rs b/modules/axfs/src/fs/fatfs.rs index 5d0c4c813..623ca2a63 100644 --- a/modules/axfs/src/fs/fatfs.rs +++ b/modules/axfs/src/fs/fatfs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use core::cell::UnsafeCell; diff --git a/modules/axfs/src/fs/mod.rs b/modules/axfs/src/fs/mod.rs index 77aad60f2..0a599703f 100644 --- a/modules/axfs/src/fs/mod.rs +++ b/modules/axfs/src/fs/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + cfg_if::cfg_if! { if #[cfg(feature = "myfs")] { pub mod myfs; diff --git a/modules/axfs/src/fs/myfs.rs b/modules/axfs/src/fs/myfs.rs index ca24fd5c7..1bdcbd1dc 100644 --- a/modules/axfs/src/fs/myfs.rs +++ b/modules/axfs/src/fs/myfs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::dev::Disk; use alloc::sync::Arc; use axfs_vfs::VfsOps; diff --git a/modules/axfs/src/lib.rs b/modules/axfs/src/lib.rs index 07baa2a7d..55e7f39b1 100644 --- a/modules/axfs/src/lib.rs +++ b/modules/axfs/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) filesystem module. //! //! It provides unified filesystem operations for various filesystems. diff --git a/modules/axfs/src/mounts.rs b/modules/axfs/src/mounts.rs index d3a0e5093..bfd663947 100644 --- a/modules/axfs/src/mounts.rs +++ b/modules/axfs/src/mounts.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use axfs_vfs::{VfsNodeType, VfsOps, VfsResult}; diff --git a/modules/axfs/src/root.rs b/modules/axfs/src/root.rs index 9bf02dce1..ac00a2b0f 100644 --- a/modules/axfs/src/root.rs +++ b/modules/axfs/src/root.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Root directory of the filesystem //! //! TODO: it doesn't work very well if the mount points have containment relationships. diff --git a/modules/axfs/tests/test_common/mod.rs b/modules/axfs/tests/test_common/mod.rs index 4746e37b4..50ae0b568 100644 --- a/modules/axfs/tests/test_common/mod.rs +++ b/modules/axfs/tests/test_common/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axfs::api as fs; use axio as io; diff --git a/modules/axfs/tests/test_fatfs.rs b/modules/axfs/tests/test_fatfs.rs index f8d046f39..78eb4523d 100644 --- a/modules/axfs/tests/test_fatfs.rs +++ b/modules/axfs/tests/test_fatfs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg(not(feature = "myfs"))] mod test_common; diff --git a/modules/axfs/tests/test_ramfs.rs b/modules/axfs/tests/test_ramfs.rs index 09a92978a..606efc81a 100644 --- a/modules/axfs/tests/test_ramfs.rs +++ b/modules/axfs/tests/test_ramfs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![cfg(feature = "myfs")] mod test_common; diff --git a/modules/axhal/build.rs b/modules/axhal/build.rs index 69343f425..aa2a5eb72 100644 --- a/modules/axhal/build.rs +++ b/modules/axhal/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::io::Result; fn main() { diff --git a/modules/axhal/src/arch/aarch64/context.rs b/modules/axhal/src/arch/aarch64/context.rs index 67b923364..7502ea332 100644 --- a/modules/axhal/src/arch/aarch64/context.rs +++ b/modules/axhal/src/arch/aarch64/context.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::asm; use memory_addr::VirtAddr; diff --git a/modules/axhal/src/arch/aarch64/mod.rs b/modules/axhal/src/arch/aarch64/mod.rs index 46d3fc7ac..b0a13e240 100644 --- a/modules/axhal/src/arch/aarch64/mod.rs +++ b/modules/axhal/src/arch/aarch64/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod context; pub(crate) mod trap; diff --git a/modules/axhal/src/arch/aarch64/trap.rs b/modules/axhal/src/arch/aarch64/trap.rs index 00afbe985..292397964 100644 --- a/modules/axhal/src/arch/aarch64/trap.rs +++ b/modules/axhal/src/arch/aarch64/trap.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::global_asm; use aarch64_cpu::registers::{ESR_EL1, FAR_EL1}; diff --git a/modules/axhal/src/arch/mod.rs b/modules/axhal/src/arch/mod.rs index b8bc0af3d..c80ad1e86 100644 --- a/modules/axhal/src/arch/mod.rs +++ b/modules/axhal/src/arch/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Architecture-specific types and operations. cfg_if::cfg_if! { diff --git a/modules/axhal/src/arch/riscv/context.rs b/modules/axhal/src/arch/riscv/context.rs index 5f9bf3e8a..b27765691 100644 --- a/modules/axhal/src/arch/riscv/context.rs +++ b/modules/axhal/src/arch/riscv/context.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::asm; use memory_addr::VirtAddr; diff --git a/modules/axhal/src/arch/riscv/macros.rs b/modules/axhal/src/arch/riscv/macros.rs index c36c4da80..48e7959bb 100644 --- a/modules/axhal/src/arch/riscv/macros.rs +++ b/modules/axhal/src/arch/riscv/macros.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + macro_rules! include_asm_marcos { () => { #[cfg(target_arch = "riscv32")] diff --git a/modules/axhal/src/arch/riscv/mod.rs b/modules/axhal/src/arch/riscv/mod.rs index 4cd5cd8df..f6245eda6 100644 --- a/modules/axhal/src/arch/riscv/mod.rs +++ b/modules/axhal/src/arch/riscv/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #[macro_use] mod macros; diff --git a/modules/axhal/src/arch/riscv/trap.rs b/modules/axhal/src/arch/riscv/trap.rs index 7624f2558..1aba93498 100644 --- a/modules/axhal/src/arch/riscv/trap.rs +++ b/modules/axhal/src/arch/riscv/trap.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use riscv::register::scause::{self, Exception as E, Trap}; use super::TrapFrame; diff --git a/modules/axhal/src/arch/x86_64/context.rs b/modules/axhal/src/arch/x86_64/context.rs index 2f1f27e53..08b12e382 100644 --- a/modules/axhal/src/arch/x86_64/context.rs +++ b/modules/axhal/src/arch/x86_64/context.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::{arch::asm, fmt}; use memory_addr::VirtAddr; diff --git a/modules/axhal/src/arch/x86_64/gdt.rs b/modules/axhal/src/arch/x86_64/gdt.rs index e0ab99ac6..4bc9fa80e 100644 --- a/modules/axhal/src/arch/x86_64/gdt.rs +++ b/modules/axhal/src/arch/x86_64/gdt.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::fmt; use x86_64::instructions::tables::{lgdt, load_tss}; diff --git a/modules/axhal/src/arch/x86_64/idt.rs b/modules/axhal/src/arch/x86_64/idt.rs index ffccff7d4..ec590cace 100644 --- a/modules/axhal/src/arch/x86_64/idt.rs +++ b/modules/axhal/src/arch/x86_64/idt.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::fmt; use x86_64::addr::VirtAddr; diff --git a/modules/axhal/src/arch/x86_64/mod.rs b/modules/axhal/src/arch/x86_64/mod.rs index f4ef11311..468a05403 100644 --- a/modules/axhal/src/arch/x86_64/mod.rs +++ b/modules/axhal/src/arch/x86_64/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod context; mod gdt; mod idt; diff --git a/modules/axhal/src/arch/x86_64/trap.rs b/modules/axhal/src/arch/x86_64/trap.rs index 0f379f14b..3b8d91ecd 100644 --- a/modules/axhal/src/arch/x86_64/trap.rs +++ b/modules/axhal/src/arch/x86_64/trap.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use x86::{controlregs::cr2, irq::*}; use super::context::TrapFrame; diff --git a/modules/axhal/src/cpu.rs b/modules/axhal/src/cpu.rs index d0ee27a34..8de9446e6 100644 --- a/modules/axhal/src/cpu.rs +++ b/modules/axhal/src/cpu.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! CPU-related operations. #[percpu::def_percpu] diff --git a/modules/axhal/src/irq.rs b/modules/axhal/src/irq.rs index 46160d40f..f350df41f 100644 --- a/modules/axhal/src/irq.rs +++ b/modules/axhal/src/irq.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Interrupt management. use handler_table::HandlerTable; diff --git a/modules/axhal/src/lib.rs b/modules/axhal/src/lib.rs index 9fd27a1b1..43cae84eb 100644 --- a/modules/axhal/src/lib.rs +++ b/modules/axhal/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS] hardware abstraction layer, provides unified APIs for //! platform-specific operations. //! diff --git a/modules/axhal/src/mem.rs b/modules/axhal/src/mem.rs index ee96c4dc5..d4d76a92d 100644 --- a/modules/axhal/src/mem.rs +++ b/modules/axhal/src/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Physical memory management. use core::fmt; diff --git a/modules/axhal/src/paging.rs b/modules/axhal/src/paging.rs index 2d035e5c6..6289164e1 100644 --- a/modules/axhal/src/paging.rs +++ b/modules/axhal/src/paging.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Page table manipulation. use axalloc::global_allocator; diff --git a/modules/axhal/src/platform/aarch64_bsta1000b/dw_apb_uart.rs b/modules/axhal/src/platform/aarch64_bsta1000b/dw_apb_uart.rs index 844a3cbb3..02bc4dba4 100644 --- a/modules/axhal/src/platform/aarch64_bsta1000b/dw_apb_uart.rs +++ b/modules/axhal/src/platform/aarch64_bsta1000b/dw_apb_uart.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! snps,dw-apb-uart serial driver use crate::mem::phys_to_virt; diff --git a/modules/axhal/src/platform/aarch64_bsta1000b/mem.rs b/modules/axhal/src/platform/aarch64_bsta1000b/mem.rs index e6faa5ef4..c8ab0932a 100644 --- a/modules/axhal/src/platform/aarch64_bsta1000b/mem.rs +++ b/modules/axhal/src/platform/aarch64_bsta1000b/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{MemRegion, PhysAddr}; use page_table_entry::{aarch64::A64PTE, GenericPTE, MappingFlags}; diff --git a/modules/axhal/src/platform/aarch64_bsta1000b/misc.rs b/modules/axhal/src/platform/aarch64_bsta1000b/misc.rs index 8954132e1..619e4217f 100644 --- a/modules/axhal/src/platform/aarch64_bsta1000b/misc.rs +++ b/modules/axhal/src/platform/aarch64_bsta1000b/misc.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + pub use crate::platform::aarch64_common::psci::system_off as terminate; use crate::mem::phys_to_virt; diff --git a/modules/axhal/src/platform/aarch64_bsta1000b/mod.rs b/modules/axhal/src/platform/aarch64_bsta1000b/mod.rs index 8c7634bcf..6735bb503 100644 --- a/modules/axhal/src/platform/aarch64_bsta1000b/mod.rs +++ b/modules/axhal/src/platform/aarch64_bsta1000b/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod dw_apb_uart; pub mod mem; diff --git a/modules/axhal/src/platform/aarch64_bsta1000b/mp.rs b/modules/axhal/src/platform/aarch64_bsta1000b/mp.rs index 489f342fa..8be93e25d 100644 --- a/modules/axhal/src/platform/aarch64_bsta1000b/mp.rs +++ b/modules/axhal/src/platform/aarch64_bsta1000b/mp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{virt_to_phys, PhysAddr, VirtAddr}; /// Hart number of bsta1000b board diff --git a/modules/axhal/src/platform/aarch64_common/boot.rs b/modules/axhal/src/platform/aarch64_common/boot.rs index a944e1811..f36f43d64 100644 --- a/modules/axhal/src/platform/aarch64_common/boot.rs +++ b/modules/axhal/src/platform/aarch64_common/boot.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use aarch64_cpu::{asm, asm::barrier, registers::*}; use memory_addr::PhysAddr; use page_table_entry::aarch64::{MemAttr, A64PTE}; diff --git a/modules/axhal/src/platform/aarch64_common/generic_timer.rs b/modules/axhal/src/platform/aarch64_common/generic_timer.rs index 59b76d165..b8f0ac047 100644 --- a/modules/axhal/src/platform/aarch64_common/generic_timer.rs +++ b/modules/axhal/src/platform/aarch64_common/generic_timer.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![allow(unused_imports)] use aarch64_cpu::registers::{CNTFRQ_EL0, CNTPCT_EL0, CNTP_CTL_EL0, CNTP_TVAL_EL0}; diff --git a/modules/axhal/src/platform/aarch64_common/gic.rs b/modules/axhal/src/platform/aarch64_common/gic.rs index 362a73ec7..ff4403a8e 100644 --- a/modules/axhal/src/platform/aarch64_common/gic.rs +++ b/modules/axhal/src/platform/aarch64_common/gic.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{irq::IrqHandler, mem::phys_to_virt}; use arm_gic::gic_v2::{GicCpuInterface, GicDistributor}; use arm_gic::{translate_irq, InterruptType}; diff --git a/modules/axhal/src/platform/aarch64_common/mod.rs b/modules/axhal/src/platform/aarch64_common/mod.rs index c585541fe..ece1d799f 100644 --- a/modules/axhal/src/platform/aarch64_common/mod.rs +++ b/modules/axhal/src/platform/aarch64_common/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod boot; pub mod generic_timer; diff --git a/modules/axhal/src/platform/aarch64_common/pl011.rs b/modules/axhal/src/platform/aarch64_common/pl011.rs index e1c9083e7..6fedc92bc 100644 --- a/modules/axhal/src/platform/aarch64_common/pl011.rs +++ b/modules/axhal/src/platform/aarch64_common/pl011.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! PL011 UART. use arm_pl011::pl011::Pl011Uart; diff --git a/modules/axhal/src/platform/aarch64_common/psci.rs b/modules/axhal/src/platform/aarch64_common/psci.rs index feca7ba6d..fdd440a34 100644 --- a/modules/axhal/src/platform/aarch64_common/psci.rs +++ b/modules/axhal/src/platform/aarch64_common/psci.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! ARM Power State Coordination Interface. #![allow(dead_code)] diff --git a/modules/axhal/src/platform/aarch64_qemu_virt/mem.rs b/modules/axhal/src/platform/aarch64_qemu_virt/mem.rs index 8218bda67..c7878c3e6 100644 --- a/modules/axhal/src/platform/aarch64_qemu_virt/mem.rs +++ b/modules/axhal/src/platform/aarch64_qemu_virt/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{MemRegion, PhysAddr}; use page_table_entry::{aarch64::A64PTE, GenericPTE, MappingFlags}; diff --git a/modules/axhal/src/platform/aarch64_qemu_virt/mod.rs b/modules/axhal/src/platform/aarch64_qemu_virt/mod.rs index 2a452fa08..5040449b4 100644 --- a/modules/axhal/src/platform/aarch64_qemu_virt/mod.rs +++ b/modules/axhal/src/platform/aarch64_qemu_virt/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + pub mod mem; #[cfg(feature = "smp")] diff --git a/modules/axhal/src/platform/aarch64_qemu_virt/mp.rs b/modules/axhal/src/platform/aarch64_qemu_virt/mp.rs index 9a619bfcb..ba635f8c3 100644 --- a/modules/axhal/src/platform/aarch64_qemu_virt/mp.rs +++ b/modules/axhal/src/platform/aarch64_qemu_virt/mp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{virt_to_phys, PhysAddr, VirtAddr}; /// Starts the given secondary CPU with its boot stack. diff --git a/modules/axhal/src/platform/aarch64_raspi/mem.rs b/modules/axhal/src/platform/aarch64_raspi/mem.rs index 7c426e08f..a56114082 100644 --- a/modules/axhal/src/platform/aarch64_raspi/mem.rs +++ b/modules/axhal/src/platform/aarch64_raspi/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::*; use page_table_entry::{aarch64::A64PTE, GenericPTE, MappingFlags}; diff --git a/modules/axhal/src/platform/aarch64_raspi/mod.rs b/modules/axhal/src/platform/aarch64_raspi/mod.rs index c7c7264d4..0517f3529 100644 --- a/modules/axhal/src/platform/aarch64_raspi/mod.rs +++ b/modules/axhal/src/platform/aarch64_raspi/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + pub mod mem; #[cfg(feature = "smp")] diff --git a/modules/axhal/src/platform/aarch64_raspi/mp.rs b/modules/axhal/src/platform/aarch64_raspi/mp.rs index 23549c01f..a3ced8389 100644 --- a/modules/axhal/src/platform/aarch64_raspi/mp.rs +++ b/modules/axhal/src/platform/aarch64_raspi/mp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{phys_to_virt, virt_to_phys, PhysAddr, VirtAddr}; static mut SECONDARY_STACK_TOP: usize = 0; diff --git a/modules/axhal/src/platform/dummy/mod.rs b/modules/axhal/src/platform/dummy/mod.rs index be0ae11d0..6c1ef9702 100644 --- a/modules/axhal/src/platform/dummy/mod.rs +++ b/modules/axhal/src/platform/dummy/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![allow(unused_variables)] #![allow(dead_code)] diff --git a/modules/axhal/src/platform/mod.rs b/modules/axhal/src/platform/mod.rs index a39151c47..9a90cc2b9 100644 --- a/modules/axhal/src/platform/mod.rs +++ b/modules/axhal/src/platform/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Platform-specific operations. cfg_if::cfg_if! { diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/boot.rs b/modules/axhal/src/platform/riscv64_qemu_virt/boot.rs index eb293133d..ace0f252f 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/boot.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/boot.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use riscv::register::satp; use axconfig::{PHYS_VIRT_OFFSET, TASK_STACK_SIZE}; diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/console.rs b/modules/axhal/src/platform/riscv64_qemu_virt/console.rs index a7ec3e646..d13eadf4c 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/console.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/console.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /// Writes a byte to the console. pub fn putchar(c: u8) { #[allow(deprecated)] diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/irq.rs b/modules/axhal/src/platform/riscv64_qemu_virt/irq.rs index f8effde7d..451056683 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/irq.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/irq.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! TODO: PLIC use crate::irq::IrqHandler; diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/mem.rs b/modules/axhal/src/platform/riscv64_qemu_virt/mem.rs index bad6113c4..727d0b171 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/mem.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::MemRegion; /// Returns platform-specific memory regions. diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/misc.rs b/modules/axhal/src/platform/riscv64_qemu_virt/misc.rs index 6b6e02fcb..680c7ebdd 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/misc.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/misc.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /// Shutdown the whole system, including all CPUs. pub fn terminate() -> ! { info!("Shutting down..."); diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/mod.rs b/modules/axhal/src/platform/riscv64_qemu_virt/mod.rs index 3805c07de..d69684c7f 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/mod.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod boot; pub mod console; diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/mp.rs b/modules/axhal/src/platform/riscv64_qemu_virt/mp.rs index ad81481f5..48c2da8c6 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/mp.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/mp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{virt_to_phys, PhysAddr, VirtAddr}; /// Starts the given secondary CPU with its boot stack. diff --git a/modules/axhal/src/platform/riscv64_qemu_virt/time.rs b/modules/axhal/src/platform/riscv64_qemu_virt/time.rs index f206785fb..16fec4589 100644 --- a/modules/axhal/src/platform/riscv64_qemu_virt/time.rs +++ b/modules/axhal/src/platform/riscv64_qemu_virt/time.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use riscv::register::time; const NANOS_PER_TICK: u64 = crate::time::NANOS_PER_SEC / axconfig::TIMER_FREQUENCY as u64; diff --git a/modules/axhal/src/platform/x86_pc/apic.rs b/modules/axhal/src/platform/x86_pc/apic.rs index eb4e3e593..790bd7691 100644 --- a/modules/axhal/src/platform/x86_pc/apic.rs +++ b/modules/axhal/src/platform/x86_pc/apic.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #![allow(dead_code)] use lazy_init::LazyInit; diff --git a/modules/axhal/src/platform/x86_pc/boot.rs b/modules/axhal/src/platform/x86_pc/boot.rs index f21f66982..02df42659 100644 --- a/modules/axhal/src/platform/x86_pc/boot.rs +++ b/modules/axhal/src/platform/x86_pc/boot.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::arch::global_asm; use x86_64::registers::control::{Cr0Flags, Cr4Flags}; diff --git a/modules/axhal/src/platform/x86_pc/dtables.rs b/modules/axhal/src/platform/x86_pc/dtables.rs index f40edb2e3..d68e26ad6 100644 --- a/modules/axhal/src/platform/x86_pc/dtables.rs +++ b/modules/axhal/src/platform/x86_pc/dtables.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Description tables (per-CPU GDT, per-CPU ISS, IDT) use crate::arch::{GdtStruct, IdtStruct, TaskStateSegment}; diff --git a/modules/axhal/src/platform/x86_pc/mem.rs b/modules/axhal/src/platform/x86_pc/mem.rs index 625e8ff29..fa8605dc3 100644 --- a/modules/axhal/src/platform/x86_pc/mem.rs +++ b/modules/axhal/src/platform/x86_pc/mem.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + // TODO: get memory regions from multiboot info. use crate::mem::{MemRegion, MemRegionFlags, PhysAddr}; diff --git a/modules/axhal/src/platform/x86_pc/misc.rs b/modules/axhal/src/platform/x86_pc/misc.rs index f01c4f339..191171a68 100644 --- a/modules/axhal/src/platform/x86_pc/misc.rs +++ b/modules/axhal/src/platform/x86_pc/misc.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use x86_64::instructions::port::PortWriteOnly; /// Shutdown the whole system (in QEMU), including all CPUs. diff --git a/modules/axhal/src/platform/x86_pc/mod.rs b/modules/axhal/src/platform/x86_pc/mod.rs index ba3ce4363..229b90e4d 100644 --- a/modules/axhal/src/platform/x86_pc/mod.rs +++ b/modules/axhal/src/platform/x86_pc/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod apic; mod boot; mod dtables; diff --git a/modules/axhal/src/platform/x86_pc/mp.rs b/modules/axhal/src/platform/x86_pc/mp.rs index dd3cdd1f5..8d69df95b 100644 --- a/modules/axhal/src/platform/x86_pc/mp.rs +++ b/modules/axhal/src/platform/x86_pc/mp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::mem::{phys_to_virt, PhysAddr, PAGE_SIZE_4K}; use crate::time::{busy_wait, Duration}; diff --git a/modules/axhal/src/platform/x86_pc/time.rs b/modules/axhal/src/platform/x86_pc/time.rs index 596db94be..205316a2d 100644 --- a/modules/axhal/src/platform/x86_pc/time.rs +++ b/modules/axhal/src/platform/x86_pc/time.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use raw_cpuid::CpuId; #[cfg(feature = "irq")] diff --git a/modules/axhal/src/platform/x86_pc/uart16550.rs b/modules/axhal/src/platform/x86_pc/uart16550.rs index 7627c080b..86531f9c6 100644 --- a/modules/axhal/src/platform/x86_pc/uart16550.rs +++ b/modules/axhal/src/platform/x86_pc/uart16550.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Uart 16550. use spinlock::SpinNoIrq; diff --git a/modules/axhal/src/time.rs b/modules/axhal/src/time.rs index f5c7fa867..fc6aca332 100644 --- a/modules/axhal/src/time.rs +++ b/modules/axhal/src/time.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Time-related operations. pub use core::time::Duration; diff --git a/modules/axhal/src/tls.rs b/modules/axhal/src/tls.rs index 849ef0e38..cba667868 100644 --- a/modules/axhal/src/tls.rs +++ b/modules/axhal/src/tls.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Thread Local Storage (TLS) support. //! //! ## TLS layout for x86_64 diff --git a/modules/axhal/src/trap.rs b/modules/axhal/src/trap.rs index 5fc9f76dc..89d862e3d 100644 --- a/modules/axhal/src/trap.rs +++ b/modules/axhal/src/trap.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Trap handling. use crate_interface::{call_interface, def_interface}; diff --git a/modules/axlog/src/lib.rs b/modules/axlog/src/lib.rs index d3ad70b46..cbd8ff179 100644 --- a/modules/axlog/src/lib.rs +++ b/modules/axlog/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Macros for multi-level formatted logging used by //! [ArceOS](https://github.com/rcore-os/arceos). //! diff --git a/modules/axnet/src/lib.rs b/modules/axnet/src/lib.rs index 301fd6091..892ab591f 100644 --- a/modules/axnet/src/lib.rs +++ b/modules/axnet/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) network module. //! //! It provides unified networking primitives for TCP/UDP communication diff --git a/modules/axnet/src/smoltcp_impl/addr.rs b/modules/axnet/src/smoltcp_impl/addr.rs index 5d683fee0..f586ec281 100644 --- a/modules/axnet/src/smoltcp_impl/addr.rs +++ b/modules/axnet/src/smoltcp_impl/addr.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::net::{IpAddr, SocketAddr}; use smoltcp::wire::{IpAddress, IpEndpoint, Ipv4Address}; diff --git a/modules/axnet/src/smoltcp_impl/bench.rs b/modules/axnet/src/smoltcp_impl/bench.rs index 81f21a69e..19ce75c77 100644 --- a/modules/axnet/src/smoltcp_impl/bench.rs +++ b/modules/axnet/src/smoltcp_impl/bench.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use super::{AxNetRxToken, AxNetTxToken, STANDARD_MTU}; use super::{DeviceWrapper, InterfaceWrapper}; use smoltcp::phy::{Device, RxToken, TxToken}; diff --git a/modules/axnet/src/smoltcp_impl/dns.rs b/modules/axnet/src/smoltcp_impl/dns.rs index 35fd4588f..ffd1714d8 100644 --- a/modules/axnet/src/smoltcp_impl/dns.rs +++ b/modules/axnet/src/smoltcp_impl/dns.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::vec::Vec; use axerrno::{ax_err_type, AxError, AxResult}; use core::net::IpAddr; diff --git a/modules/axnet/src/smoltcp_impl/listen_table.rs b/modules/axnet/src/smoltcp_impl/listen_table.rs index 7aac9ef1e..58341e4c7 100644 --- a/modules/axnet/src/smoltcp_impl/listen_table.rs +++ b/modules/axnet/src/smoltcp_impl/listen_table.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::{boxed::Box, collections::VecDeque}; use core::ops::{Deref, DerefMut}; diff --git a/modules/axnet/src/smoltcp_impl/mod.rs b/modules/axnet/src/smoltcp_impl/mod.rs index 5c50e0679..3817d7859 100644 --- a/modules/axnet/src/smoltcp_impl/mod.rs +++ b/modules/axnet/src/smoltcp_impl/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod addr; mod bench; mod dns; diff --git a/modules/axnet/src/smoltcp_impl/tcp.rs b/modules/axnet/src/smoltcp_impl/tcp.rs index 5c9d5dda1..b3da5d079 100644 --- a/modules/axnet/src/smoltcp_impl/tcp.rs +++ b/modules/axnet/src/smoltcp_impl/tcp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::cell::UnsafeCell; use core::net::SocketAddr; use core::sync::atomic::{AtomicBool, AtomicU8, Ordering}; diff --git a/modules/axnet/src/smoltcp_impl/udp.rs b/modules/axnet/src/smoltcp_impl/udp.rs index 371640470..fae4f93f6 100644 --- a/modules/axnet/src/smoltcp_impl/udp.rs +++ b/modules/axnet/src/smoltcp_impl/udp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::net::SocketAddr; use core::sync::atomic::{AtomicBool, Ordering}; diff --git a/modules/axruntime/src/lang_items.rs b/modules/axruntime/src/lang_items.rs index 6600cdd74..22db2ad5a 100644 --- a/modules/axruntime/src/lang_items.rs +++ b/modules/axruntime/src/lang_items.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::panic::PanicInfo; #[panic_handler] diff --git a/modules/axruntime/src/lib.rs b/modules/axruntime/src/lib.rs index a62c3055c..56491d50c 100644 --- a/modules/axruntime/src/lib.rs +++ b/modules/axruntime/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Runtime library of [ArceOS](https://github.com/rcore-os/arceos). //! //! Any application uses ArceOS should link this library. It does some diff --git a/modules/axruntime/src/mp.rs b/modules/axruntime/src/mp.rs index 768ef5188..e05909968 100644 --- a/modules/axruntime/src/mp.rs +++ b/modules/axruntime/src/mp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axconfig::{SMP, TASK_STACK_SIZE}; use axhal::mem::{virt_to_phys, VirtAddr}; use core::sync::atomic::{AtomicUsize, Ordering}; diff --git a/modules/axruntime/src/trap.rs b/modules/axruntime/src/trap.rs index 5a8a80d38..b5584b495 100644 --- a/modules/axruntime/src/trap.rs +++ b/modules/axruntime/src/trap.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + struct TrapHandlerImpl; #[crate_interface::impl_interface] diff --git a/modules/axsync/src/lib.rs b/modules/axsync/src/lib.rs index 124585017..b8d0918e3 100644 --- a/modules/axsync/src/lib.rs +++ b/modules/axsync/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) synchronization primitives. //! //! Currently supported primitives: diff --git a/modules/axsync/src/mutex.rs b/modules/axsync/src/mutex.rs index 0777bcc6b..f5fa745c2 100644 --- a/modules/axsync/src/mutex.rs +++ b/modules/axsync/src/mutex.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A naïve sleeping mutex. use core::cell::UnsafeCell; diff --git a/modules/axtask/src/api.rs b/modules/axtask/src/api.rs index 8e75f270e..640eaedc6 100644 --- a/modules/axtask/src/api.rs +++ b/modules/axtask/src/api.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Task APIs for multi-task configuration. use alloc::{string::String, sync::Arc}; diff --git a/modules/axtask/src/api_s.rs b/modules/axtask/src/api_s.rs index aacbf805a..ed1ee4199 100644 --- a/modules/axtask/src/api_s.rs +++ b/modules/axtask/src/api_s.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Task APIs for single-task configuration. /// For single-task situation, we just relax the CPU and wait for incoming diff --git a/modules/axtask/src/lib.rs b/modules/axtask/src/lib.rs index 2147f4646..1be43dc5a 100644 --- a/modules/axtask/src/lib.rs +++ b/modules/axtask/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS](https://github.com/rcore-os/arceos) task management module. //! //! This module provides primitives for task management, including task diff --git a/modules/axtask/src/run_queue.rs b/modules/axtask/src/run_queue.rs index 9c31f4384..38d1ac8e0 100644 --- a/modules/axtask/src/run_queue.rs +++ b/modules/axtask/src/run_queue.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::collections::VecDeque; use alloc::sync::Arc; use lazy_init::LazyInit; diff --git a/modules/axtask/src/task.rs b/modules/axtask/src/task.rs index 7db9d78b6..b7b91da80 100644 --- a/modules/axtask/src/task.rs +++ b/modules/axtask/src/task.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::{boxed::Box, string::String, sync::Arc}; use core::ops::Deref; use core::sync::atomic::{AtomicBool, AtomicI32, AtomicU64, AtomicU8, Ordering}; diff --git a/modules/axtask/src/tests.rs b/modules/axtask/src/tests.rs index c3dbe0af9..1e3050675 100644 --- a/modules/axtask/src/tests.rs +++ b/modules/axtask/src/tests.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Mutex, Once}; diff --git a/modules/axtask/src/timers.rs b/modules/axtask/src/timers.rs index f68a9f0c8..e273c5e87 100644 --- a/modules/axtask/src/timers.rs +++ b/modules/axtask/src/timers.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::sync::Arc; use axhal::time::current_time; use lazy_init::LazyInit; diff --git a/modules/axtask/src/wait_queue.rs b/modules/axtask/src/wait_queue.rs index 0fc06c3a8..84e4c1729 100644 --- a/modules/axtask/src/wait_queue.rs +++ b/modules/axtask/src/wait_queue.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::collections::VecDeque; use alloc::sync::Arc; use spinlock::SpinRaw; diff --git a/tools/bwbench_client/src/device.rs b/tools/bwbench_client/src/device.rs index 67097482a..5345c8a25 100644 --- a/tools/bwbench_client/src/device.rs +++ b/tools/bwbench_client/src/device.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::os::unix::io::AsRawFd; const ETH_P_ALL: libc::c_short = 0x0003; diff --git a/tools/bwbench_client/src/main.rs b/tools/bwbench_client/src/main.rs index f9b24c69c..c09b6c8f5 100644 --- a/tools/bwbench_client/src/main.rs +++ b/tools/bwbench_client/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A raw socket benchmark client. #![deny(warnings)] diff --git a/tools/deptool/src/cmd_builder.rs b/tools/deptool/src/cmd_builder.rs index 5a6b389d7..aa01b2625 100644 --- a/tools/deptool/src/cmd_builder.rs +++ b/tools/deptool/src/cmd_builder.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::Config; pub fn build_cargo_tree_cmd(cfg: &Config) -> String { diff --git a/tools/deptool/src/cmd_parser.rs b/tools/deptool/src/cmd_parser.rs index d3bc109bc..c679cb456 100644 --- a/tools/deptool/src/cmd_parser.rs +++ b/tools/deptool/src/cmd_parser.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::{fs, path::Path}; use clap::{Arg, ArgAction, Command}; use crate::{Config, GraphFormat}; diff --git a/tools/deptool/src/d2_generator.rs b/tools/deptool/src/d2_generator.rs index 0a76e107f..cec86669e 100644 --- a/tools/deptool/src/d2_generator.rs +++ b/tools/deptool/src/d2_generator.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::collections::HashMap; use crate::{parse_deps, cmd_parser::is_arceos_crate}; diff --git a/tools/deptool/src/lib.rs b/tools/deptool/src/lib.rs index aa24bc2f0..7adc5aad0 100644 --- a/tools/deptool/src/lib.rs +++ b/tools/deptool/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + mod cmd_parser; mod cmd_builder; mod mermaid_generator; diff --git a/tools/deptool/src/main.rs b/tools/deptool/src/main.rs index b6b0fb75f..67ed5f243 100644 --- a/tools/deptool/src/main.rs +++ b/tools/deptool/src/main.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use deptool::{run, parse_cmd}; use std::process; diff --git a/tools/deptool/src/mermaid_generator.rs b/tools/deptool/src/mermaid_generator.rs index bb43552b2..b569fda69 100644 --- a/tools/deptool/src/mermaid_generator.rs +++ b/tools/deptool/src/mermaid_generator.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use std::collections::HashMap; use crate::{parse_deps, cmd_parser::is_arceos_crate}; diff --git a/ulib/axlibc/build.rs b/ulib/axlibc/build.rs index 6c33c929c..e91bb6264 100644 --- a/ulib/axlibc/build.rs +++ b/ulib/axlibc/build.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + fn main() { fn gen_c_to_rust_bindings(in_file: &str, out_file: &str) { println!("cargo:rerun-if-changed={in_file}"); diff --git a/ulib/axlibc/c/assert.c b/ulib/axlibc/c/assert.c index ee071677d..76499459e 100644 --- a/ulib/axlibc/c/assert.c +++ b/ulib/axlibc/c/assert.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/ctype.c b/ulib/axlibc/c/ctype.c index 08e8e5e07..d7e7e821a 100644 --- a/ulib/axlibc/c/ctype.c +++ b/ulib/axlibc/c/ctype.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/dirent.c b/ulib/axlibc/c/dirent.c index a69094a7d..a7df1473a 100644 --- a/ulib/axlibc/c/dirent.c +++ b/ulib/axlibc/c/dirent.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_FS #include diff --git a/ulib/axlibc/c/dlfcn.c b/ulib/axlibc/c/dlfcn.c index a539e7d0c..f8518f915 100644 --- a/ulib/axlibc/c/dlfcn.c +++ b/ulib/axlibc/c/dlfcn.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/env.c b/ulib/axlibc/c/env.c index a0505a9ee..cbd1a9f05 100644 --- a/ulib/axlibc/c/env.c +++ b/ulib/axlibc/c/env.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/fcntl.c b/ulib/axlibc/c/fcntl.c index fa9091713..61f8e979b 100644 --- a/ulib/axlibc/c/fcntl.c +++ b/ulib/axlibc/c/fcntl.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/flock.c b/ulib/axlibc/c/flock.c index 8ac9beec5..631a3935f 100644 --- a/ulib/axlibc/c/flock.c +++ b/ulib/axlibc/c/flock.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/fnmatch.c b/ulib/axlibc/c/fnmatch.c index 3895fa2c8..fcd2d4fc8 100644 --- a/ulib/axlibc/c/fnmatch.c +++ b/ulib/axlibc/c/fnmatch.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/glob.c b/ulib/axlibc/c/glob.c index 841a226dd..28b0923ab 100644 --- a/ulib/axlibc/c/glob.c +++ b/ulib/axlibc/c/glob.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_FS #include diff --git a/ulib/axlibc/c/ioctl.c b/ulib/axlibc/c/ioctl.c index df2aad167..9c961bb76 100644 --- a/ulib/axlibc/c/ioctl.c +++ b/ulib/axlibc/c/ioctl.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/libgen.c b/ulib/axlibc/c/libgen.c index fbce88154..acfbca4cb 100644 --- a/ulib/axlibc/c/libgen.c +++ b/ulib/axlibc/c/libgen.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/libm.c b/ulib/axlibc/c/libm.c index c8420112e..7e98b71e3 100644 --- a/ulib/axlibc/c/libm.c +++ b/ulib/axlibc/c/libm.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_FP_SIMD #include diff --git a/ulib/axlibc/c/libm.h b/ulib/axlibc/c/libm.h index ac9130d7b..1df1a0e5a 100644 --- a/ulib/axlibc/c/libm.h +++ b/ulib/axlibc/c/libm.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _LIBM_H #define _LIBM_H diff --git a/ulib/axlibc/c/locale.c b/ulib/axlibc/c/locale.c index 9c535ac3d..8def82e7c 100644 --- a/ulib/axlibc/c/locale.c +++ b/ulib/axlibc/c/locale.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/log.c b/ulib/axlibc/c/log.c index 4e34aa0ac..61492c035 100644 --- a/ulib/axlibc/c/log.c +++ b/ulib/axlibc/c/log.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_FP_SIMD #include diff --git a/ulib/axlibc/c/math.c b/ulib/axlibc/c/math.c index 04ee1e7c3..3364a7348 100644 --- a/ulib/axlibc/c/math.c +++ b/ulib/axlibc/c/math.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_FP_SIMD #include diff --git a/ulib/axlibc/c/mmap.c b/ulib/axlibc/c/mmap.c index e3204d714..a9786dba9 100644 --- a/ulib/axlibc/c/mmap.c +++ b/ulib/axlibc/c/mmap.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/network.c b/ulib/axlibc/c/network.c index 4c6beb845..8f3192101 100644 --- a/ulib/axlibc/c/network.c +++ b/ulib/axlibc/c/network.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_NET #include diff --git a/ulib/axlibc/c/poll.c b/ulib/axlibc/c/poll.c index 5474246f3..988628618 100644 --- a/ulib/axlibc/c/poll.c +++ b/ulib/axlibc/c/poll.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/pow.c b/ulib/axlibc/c/pow.c index 217201176..aa4ccc158 100644 --- a/ulib/axlibc/c/pow.c +++ b/ulib/axlibc/c/pow.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #if defined(AX_CONFIG_FP_SIMD) #include diff --git a/ulib/axlibc/c/printf.c b/ulib/axlibc/c/printf.c index 3657376bd..f5b91d77d 100644 --- a/ulib/axlibc/c/printf.c +++ b/ulib/axlibc/c/printf.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /** * @author (c) Eyal Rozenberg * 2021-2022, Haifa, Palestine/Israel diff --git a/ulib/axlibc/c/printf.h b/ulib/axlibc/c/printf.h index c6484e504..4ee461703 100644 --- a/ulib/axlibc/c/printf.h +++ b/ulib/axlibc/c/printf.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + /** * @author (c) Eyal Rozenberg * 2021-2022, Haifa, Palestine/Israel diff --git a/ulib/axlibc/c/printf_config.h b/ulib/axlibc/c/printf_config.h index bd860a754..64466ea4f 100644 --- a/ulib/axlibc/c/printf_config.h +++ b/ulib/axlibc/c/printf_config.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef PRINTF_CONFIG_H #define PRINTF_CONFIG_H diff --git a/ulib/axlibc/c/pthread.c b/ulib/axlibc/c/pthread.c index 74fb1faf1..f6fbdd015 100644 --- a/ulib/axlibc/c/pthread.c +++ b/ulib/axlibc/c/pthread.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_MULTITASK #include diff --git a/ulib/axlibc/c/pwd.c b/ulib/axlibc/c/pwd.c index 61f32f4ae..3beb91cb3 100644 --- a/ulib/axlibc/c/pwd.c +++ b/ulib/axlibc/c/pwd.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/resource.c b/ulib/axlibc/c/resource.c index 3e34624cb..c008a7200 100644 --- a/ulib/axlibc/c/resource.c +++ b/ulib/axlibc/c/resource.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/sched.c b/ulib/axlibc/c/sched.c index 21203c465..7910af645 100644 --- a/ulib/axlibc/c/sched.c +++ b/ulib/axlibc/c/sched.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/select.c b/ulib/axlibc/c/select.c index d20d5f680..b8103434e 100644 --- a/ulib/axlibc/c/select.c +++ b/ulib/axlibc/c/select.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_SELECT #include diff --git a/ulib/axlibc/c/signal.c b/ulib/axlibc/c/signal.c index de2164767..94fd0a6c3 100644 --- a/ulib/axlibc/c/signal.c +++ b/ulib/axlibc/c/signal.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/socket.c b/ulib/axlibc/c/socket.c index 677e43198..05edc1c3a 100644 --- a/ulib/axlibc/c/socket.c +++ b/ulib/axlibc/c/socket.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifdef AX_CONFIG_NET #include diff --git a/ulib/axlibc/c/stat.c b/ulib/axlibc/c/stat.c index 27ff3d814..8491633b0 100644 --- a/ulib/axlibc/c/stat.c +++ b/ulib/axlibc/c/stat.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/stdio.c b/ulib/axlibc/c/stdio.c index 03ea75cf3..f749ea488 100644 --- a/ulib/axlibc/c/stdio.c +++ b/ulib/axlibc/c/stdio.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include "printf.h" #include #include diff --git a/ulib/axlibc/c/stdlib.c b/ulib/axlibc/c/stdlib.c index ef8a82368..399429744 100644 --- a/ulib/axlibc/c/stdlib.c +++ b/ulib/axlibc/c/stdlib.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/string.c b/ulib/axlibc/c/string.c index 2c56d7e92..d9418bd5e 100644 --- a/ulib/axlibc/c/string.c +++ b/ulib/axlibc/c/string.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/syslog.c b/ulib/axlibc/c/syslog.c index eb0ea8a1d..7b70bf942 100644 --- a/ulib/axlibc/c/syslog.c +++ b/ulib/axlibc/c/syslog.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/time.c b/ulib/axlibc/c/time.c index 9a2384ad9..40ae7f4e2 100644 --- a/ulib/axlibc/c/time.c +++ b/ulib/axlibc/c/time.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/unistd.c b/ulib/axlibc/c/unistd.c index eec49bf6b..d9a5d0275 100644 --- a/ulib/axlibc/c/unistd.c +++ b/ulib/axlibc/c/unistd.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/c/utsname.c b/ulib/axlibc/c/utsname.c index 14c35c805..18b6dd7a8 100644 --- a/ulib/axlibc/c/utsname.c +++ b/ulib/axlibc/c/utsname.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/c/wait.c b/ulib/axlibc/c/wait.c index a63fa278c..a40ddb1cc 100644 --- a/ulib/axlibc/c/wait.c +++ b/ulib/axlibc/c/wait.c @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include #include diff --git a/ulib/axlibc/ctypes.h b/ulib/axlibc/ctypes.h index 882ec691c..8cda0b833 100644 --- a/ulib/axlibc/ctypes.h +++ b/ulib/axlibc/ctypes.h @@ -1,2 +1,11 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #include #include diff --git a/ulib/axlibc/include/arpa/inet.h b/ulib/axlibc/include/arpa/inet.h index 88889f61d..032413548 100644 --- a/ulib/axlibc/include/arpa/inet.h +++ b/ulib/axlibc/include/arpa/inet.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _ARPA_INET_H #define _ARPA_INET_H diff --git a/ulib/axlibc/include/assert.h b/ulib/axlibc/include/assert.h index 0385fa3af..4d210ba82 100644 --- a/ulib/axlibc/include/assert.h +++ b/ulib/axlibc/include/assert.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __ASSERT_H__ #define __ASSERT_H__ diff --git a/ulib/axlibc/include/ctype.h b/ulib/axlibc/include/ctype.h index a3ba95b03..7e4e5b895 100644 --- a/ulib/axlibc/include/ctype.h +++ b/ulib/axlibc/include/ctype.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _CTYPE_H #define _CTYPE_H diff --git a/ulib/axlibc/include/dirent.h b/ulib/axlibc/include/dirent.h index 41897510b..57b137af3 100644 --- a/ulib/axlibc/include/dirent.h +++ b/ulib/axlibc/include/dirent.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _DIRENT_H #define _DIRENT_H diff --git a/ulib/axlibc/include/dlfcn.h b/ulib/axlibc/include/dlfcn.h index a1caea91e..2f5124ba0 100644 --- a/ulib/axlibc/include/dlfcn.h +++ b/ulib/axlibc/include/dlfcn.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _DLFCN_H #define _DLFCN_H diff --git a/ulib/axlibc/include/endian.h b/ulib/axlibc/include/endian.h index 819a726a4..7be379458 100644 --- a/ulib/axlibc/include/endian.h +++ b/ulib/axlibc/include/endian.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _ENDIAN_H #define _ENDIAN_H diff --git a/ulib/axlibc/include/errno.h b/ulib/axlibc/include/errno.h index 16ed78e31..64989a642 100644 --- a/ulib/axlibc/include/errno.h +++ b/ulib/axlibc/include/errno.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __ERRNO_H__ #define __ERRNO_H__ diff --git a/ulib/axlibc/include/fcntl.h b/ulib/axlibc/include/fcntl.h index 48750af66..a6184ef84 100644 --- a/ulib/axlibc/include/fcntl.h +++ b/ulib/axlibc/include/fcntl.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __FCNTL_H__ #define __FCNTL_H__ diff --git a/ulib/axlibc/include/features.h b/ulib/axlibc/include/features.h index 2801151cc..a9907595c 100644 --- a/ulib/axlibc/include/features.h +++ b/ulib/axlibc/include/features.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _FEATURES_H #define _FEATURES_H diff --git a/ulib/axlibc/include/float.h b/ulib/axlibc/include/float.h index 32ac40abf..a52548520 100644 --- a/ulib/axlibc/include/float.h +++ b/ulib/axlibc/include/float.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _FLOAT_H #define _FLOAT_H diff --git a/ulib/axlibc/include/fnmatch.h b/ulib/axlibc/include/fnmatch.h index c387c5ce7..70f730a3d 100644 --- a/ulib/axlibc/include/fnmatch.h +++ b/ulib/axlibc/include/fnmatch.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _FNMATCH_H #define _FNMATCH_H diff --git a/ulib/axlibc/include/glob.h b/ulib/axlibc/include/glob.h index 4dbd34705..3e94f072d 100644 --- a/ulib/axlibc/include/glob.h +++ b/ulib/axlibc/include/glob.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _GLOB_H #define _GLOB_H diff --git a/ulib/axlibc/include/inttypes.h b/ulib/axlibc/include/inttypes.h index 536fd3ffa..554356012 100644 --- a/ulib/axlibc/include/inttypes.h +++ b/ulib/axlibc/include/inttypes.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _INTTYPES_H #define _INTTYPES_H diff --git a/ulib/axlibc/include/langinfo.h b/ulib/axlibc/include/langinfo.h index 9114fba47..3ea38a6cb 100644 --- a/ulib/axlibc/include/langinfo.h +++ b/ulib/axlibc/include/langinfo.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _LANGINFO_H #define _LANGINFO_H diff --git a/ulib/axlibc/include/libgen.h b/ulib/axlibc/include/libgen.h index 7c7fd9c6d..567aacc49 100644 --- a/ulib/axlibc/include/libgen.h +++ b/ulib/axlibc/include/libgen.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _LIBGEN_H #define _LIBGEN_H diff --git a/ulib/axlibc/include/limits.h b/ulib/axlibc/include/limits.h index 26b213a96..89cafd535 100644 --- a/ulib/axlibc/include/limits.h +++ b/ulib/axlibc/include/limits.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __LIMITS__ #define __LIMITS__ diff --git a/ulib/axlibc/include/locale.h b/ulib/axlibc/include/locale.h index e33b13712..e68ff0ce6 100644 --- a/ulib/axlibc/include/locale.h +++ b/ulib/axlibc/include/locale.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _LOCALE_H #define _LOCALE_H diff --git a/ulib/axlibc/include/math.h b/ulib/axlibc/include/math.h index 649b85126..35fb85b1c 100644 --- a/ulib/axlibc/include/math.h +++ b/ulib/axlibc/include/math.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _MATH_H #define _MATH_H diff --git a/ulib/axlibc/include/memory.h b/ulib/axlibc/include/memory.h index d51b932ee..31c4a81f6 100644 --- a/ulib/axlibc/include/memory.h +++ b/ulib/axlibc/include/memory.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __MEMORY_H__ #define __MEMORY_H__ diff --git a/ulib/axlibc/include/netdb.h b/ulib/axlibc/include/netdb.h index 6272578b7..315c59f6c 100644 --- a/ulib/axlibc/include/netdb.h +++ b/ulib/axlibc/include/netdb.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _NETDB_H #define _NETDB_H diff --git a/ulib/axlibc/include/netinet/in.h b/ulib/axlibc/include/netinet/in.h index 370f3b17b..48684aafb 100644 --- a/ulib/axlibc/include/netinet/in.h +++ b/ulib/axlibc/include/netinet/in.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _NETINET_IN_H #define _NETINET_IN_H diff --git a/ulib/axlibc/include/netinet/tcp.h b/ulib/axlibc/include/netinet/tcp.h index dfe65d108..2b4c9dec3 100644 --- a/ulib/axlibc/include/netinet/tcp.h +++ b/ulib/axlibc/include/netinet/tcp.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _NETINET_TCP_H #define _NETINET_TCP_H diff --git a/ulib/axlibc/include/poll.h b/ulib/axlibc/include/poll.h index e5903f249..49000b89d 100644 --- a/ulib/axlibc/include/poll.h +++ b/ulib/axlibc/include/poll.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _POLL_H #define _POLL_H diff --git a/ulib/axlibc/include/pthread.h b/ulib/axlibc/include/pthread.h index 5f8cd98aa..9677f2867 100644 --- a/ulib/axlibc/include/pthread.h +++ b/ulib/axlibc/include/pthread.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _PTHREAD_H #define _PTHREAD_H diff --git a/ulib/axlibc/include/pwd.h b/ulib/axlibc/include/pwd.h index 354854619..6d6c647ef 100644 --- a/ulib/axlibc/include/pwd.h +++ b/ulib/axlibc/include/pwd.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _PWD_H #define _PWD_H diff --git a/ulib/axlibc/include/regex.h b/ulib/axlibc/include/regex.h index 50b382885..dda592d56 100644 --- a/ulib/axlibc/include/regex.h +++ b/ulib/axlibc/include/regex.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _REGEX_H #define _REGEX_H diff --git a/ulib/axlibc/include/sched.h b/ulib/axlibc/include/sched.h index ed201c584..92774c705 100644 --- a/ulib/axlibc/include/sched.h +++ b/ulib/axlibc/include/sched.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SCHED_H #define _SCHED_H diff --git a/ulib/axlibc/include/setjmp.h b/ulib/axlibc/include/setjmp.h index 70981dfb4..c9583c05d 100644 --- a/ulib/axlibc/include/setjmp.h +++ b/ulib/axlibc/include/setjmp.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SETJMP_H #define _SETJMP_H diff --git a/ulib/axlibc/include/signal.h b/ulib/axlibc/include/signal.h index 52e21cee7..d28864856 100644 --- a/ulib/axlibc/include/signal.h +++ b/ulib/axlibc/include/signal.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SIGNAL_H #define _SIGNAL_H diff --git a/ulib/axlibc/include/stdarg.h b/ulib/axlibc/include/stdarg.h index 3c23d618c..aab5d0ad7 100644 --- a/ulib/axlibc/include/stdarg.h +++ b/ulib/axlibc/include/stdarg.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STDARG_H__ #define __STDARG_H__ diff --git a/ulib/axlibc/include/stdbool.h b/ulib/axlibc/include/stdbool.h index e3325f24c..592345c47 100644 --- a/ulib/axlibc/include/stdbool.h +++ b/ulib/axlibc/include/stdbool.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STDBOOL_H__ #define __STDBOOL_H__ diff --git a/ulib/axlibc/include/stddef.h b/ulib/axlibc/include/stddef.h index faf08bdd7..e1657da62 100644 --- a/ulib/axlibc/include/stddef.h +++ b/ulib/axlibc/include/stddef.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STDDEF_H__ #define __STDDEF_H__ diff --git a/ulib/axlibc/include/stdint.h b/ulib/axlibc/include/stdint.h index 3081bf011..712d17ad7 100644 --- a/ulib/axlibc/include/stdint.h +++ b/ulib/axlibc/include/stdint.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STDINT_H__ #define __STDINT_H__ diff --git a/ulib/axlibc/include/stdio.h b/ulib/axlibc/include/stdio.h index 12aca2a88..d42ad46f3 100644 --- a/ulib/axlibc/include/stdio.h +++ b/ulib/axlibc/include/stdio.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STDIO_H__ #define __STDIO_H__ diff --git a/ulib/axlibc/include/stdlib.h b/ulib/axlibc/include/stdlib.h index 411ea48b1..284863044 100644 --- a/ulib/axlibc/include/stdlib.h +++ b/ulib/axlibc/include/stdlib.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STDLIB_H__ #define __STDLIB_H__ diff --git a/ulib/axlibc/include/string.h b/ulib/axlibc/include/string.h index 3160af4ed..a77e8aa83 100644 --- a/ulib/axlibc/include/string.h +++ b/ulib/axlibc/include/string.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STRING_H__ #define __STRING_H__ diff --git a/ulib/axlibc/include/strings.h b/ulib/axlibc/include/strings.h index 3616bae19..b0e23a86e 100644 --- a/ulib/axlibc/include/strings.h +++ b/ulib/axlibc/include/strings.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __STRINGS_H__ #define __STRINGS_H__ diff --git a/ulib/axlibc/include/sys/epoll.h b/ulib/axlibc/include/sys/epoll.h index bd23bcf46..eb0fe8500 100644 --- a/ulib/axlibc/include/sys/epoll.h +++ b/ulib/axlibc/include/sys/epoll.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_EPOLL_H #define _SYS_EPOLL_H diff --git a/ulib/axlibc/include/sys/file.h b/ulib/axlibc/include/sys/file.h index d5e15a67f..8f8829e1c 100644 --- a/ulib/axlibc/include/sys/file.h +++ b/ulib/axlibc/include/sys/file.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_FILE_H #define _SYS_FILE_H diff --git a/ulib/axlibc/include/sys/ioctl.h b/ulib/axlibc/include/sys/ioctl.h index e43c51013..374b8215b 100644 --- a/ulib/axlibc/include/sys/ioctl.h +++ b/ulib/axlibc/include/sys/ioctl.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __SYS_IOCTL_H__ #define __SYS_IOCTL_H__ diff --git a/ulib/axlibc/include/sys/mman.h b/ulib/axlibc/include/sys/mman.h index 3d3502345..8c6e24be5 100644 --- a/ulib/axlibc/include/sys/mman.h +++ b/ulib/axlibc/include/sys/mman.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __SYS_MMAN_H__ #define __SYS_MMAN_H__ diff --git a/ulib/axlibc/include/sys/param.h b/ulib/axlibc/include/sys/param.h index bbb762f54..03968092c 100644 --- a/ulib/axlibc/include/sys/param.h +++ b/ulib/axlibc/include/sys/param.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_PARAM_H #define _SYS_PARAM_H diff --git a/ulib/axlibc/include/sys/prctl.h b/ulib/axlibc/include/sys/prctl.h index 1ed9cc10e..98ad279aa 100644 --- a/ulib/axlibc/include/sys/prctl.h +++ b/ulib/axlibc/include/sys/prctl.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_PRCTL_H #define _SYS_PRCTL_H diff --git a/ulib/axlibc/include/sys/resource.h b/ulib/axlibc/include/sys/resource.h index 99c8bbc6d..f0709f98b 100644 --- a/ulib/axlibc/include/sys/resource.h +++ b/ulib/axlibc/include/sys/resource.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_RESOURCE_H #define _SYS_RESOURCE_H diff --git a/ulib/axlibc/include/sys/select.h b/ulib/axlibc/include/sys/select.h index e8cc2c5ae..082eacb36 100644 --- a/ulib/axlibc/include/sys/select.h +++ b/ulib/axlibc/include/sys/select.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_SELECT_H #define _SYS_SELECT_H diff --git a/ulib/axlibc/include/sys/socket.h b/ulib/axlibc/include/sys/socket.h index c89c5f1c5..7a6875677 100644 --- a/ulib/axlibc/include/sys/socket.h +++ b/ulib/axlibc/include/sys/socket.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __SOCKET_H__ #define __SOCKET_H__ diff --git a/ulib/axlibc/include/sys/stat.h b/ulib/axlibc/include/sys/stat.h index 24806af7a..664e4d09a 100644 --- a/ulib/axlibc/include/sys/stat.h +++ b/ulib/axlibc/include/sys/stat.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __SYS_STAT_H__ #define __SYS_STAT_H__ diff --git a/ulib/axlibc/include/sys/time.h b/ulib/axlibc/include/sys/time.h index 5eeaf4c6b..5acb5588a 100644 --- a/ulib/axlibc/include/sys/time.h +++ b/ulib/axlibc/include/sys/time.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __SYS_TIME_H__ #define __SYS_TIME_H__ diff --git a/ulib/axlibc/include/sys/types.h b/ulib/axlibc/include/sys/types.h index adb6c3531..1020f1cfe 100644 --- a/ulib/axlibc/include/sys/types.h +++ b/ulib/axlibc/include/sys/types.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __SYS_TYPES_H__ #define __SYS_TYPES_H__ diff --git a/ulib/axlibc/include/sys/uio.h b/ulib/axlibc/include/sys/uio.h index d38b197c8..27a0a0902 100644 --- a/ulib/axlibc/include/sys/uio.h +++ b/ulib/axlibc/include/sys/uio.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_UIO_H #define _SYS_UIO_H diff --git a/ulib/axlibc/include/sys/un.h b/ulib/axlibc/include/sys/un.h index 85e43ea7b..db78971b4 100644 --- a/ulib/axlibc/include/sys/un.h +++ b/ulib/axlibc/include/sys/un.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_UN_H #define _SYS_UN_H diff --git a/ulib/axlibc/include/sys/utsname.h b/ulib/axlibc/include/sys/utsname.h index fa708a129..2e20c6feb 100644 --- a/ulib/axlibc/include/sys/utsname.h +++ b/ulib/axlibc/include/sys/utsname.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_UTSNAME_H #define _SYS_UTSNAME_H diff --git a/ulib/axlibc/include/sys/wait.h b/ulib/axlibc/include/sys/wait.h index f5e38877e..135a4cfeb 100644 --- a/ulib/axlibc/include/sys/wait.h +++ b/ulib/axlibc/include/sys/wait.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYS_WAIT_H #define _SYS_WAIT_H diff --git a/ulib/axlibc/include/syslog.h b/ulib/axlibc/include/syslog.h index f98d66342..586d4e251 100644 --- a/ulib/axlibc/include/syslog.h +++ b/ulib/axlibc/include/syslog.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _SYSLOG_H #define _SYSLOG_H diff --git a/ulib/axlibc/include/termios.h b/ulib/axlibc/include/termios.h index d319c5b81..5006dc113 100644 --- a/ulib/axlibc/include/termios.h +++ b/ulib/axlibc/include/termios.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef _TERMIOS_H #define _TERMIOS_H diff --git a/ulib/axlibc/include/time.h b/ulib/axlibc/include/time.h index 356edf920..041b0fca7 100644 --- a/ulib/axlibc/include/time.h +++ b/ulib/axlibc/include/time.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __TIME_H__ #define __TIME_H__ diff --git a/ulib/axlibc/include/unistd.h b/ulib/axlibc/include/unistd.h index 46b580df8..b428bf423 100644 --- a/ulib/axlibc/include/unistd.h +++ b/ulib/axlibc/include/unistd.h @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + #ifndef __UNISTD_H__ #define __UNISTD_H__ diff --git a/ulib/axlibc/src/errno.rs b/ulib/axlibc/src/errno.rs index a80479326..bedf32815 100644 --- a/ulib/axlibc/src/errno.rs +++ b/ulib/axlibc/src/errno.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use axerrno::LinuxError; use core::ffi::{c_char, c_int}; diff --git a/ulib/axlibc/src/fd_ops.rs b/ulib/axlibc/src/fd_ops.rs index 1b1a9d000..d73f5f04a 100644 --- a/ulib/axlibc/src/fd_ops.rs +++ b/ulib/axlibc/src/fd_ops.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{ctypes, utils::e}; use arceos_posix_api::{sys_close, sys_dup, sys_dup2, sys_fcntl}; use axerrno::LinuxError; diff --git a/ulib/axlibc/src/fs.rs b/ulib/axlibc/src/fs.rs index bd93f8876..68ca7561f 100644 --- a/ulib/axlibc/src/fs.rs +++ b/ulib/axlibc/src/fs.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::{c_char, c_int}; use arceos_posix_api::{ diff --git a/ulib/axlibc/src/io.rs b/ulib/axlibc/src/io.rs index ea6187b71..f3bdfd7cf 100644 --- a/ulib/axlibc/src/io.rs +++ b/ulib/axlibc/src/io.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::{c_int, c_void}; use arceos_posix_api::{sys_read, sys_write, sys_writev}; diff --git a/ulib/axlibc/src/io_mpx.rs b/ulib/axlibc/src/io_mpx.rs index 2bcffc7e0..522b8d7d9 100644 --- a/ulib/axlibc/src/io_mpx.rs +++ b/ulib/axlibc/src/io_mpx.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{ctypes, utils::e}; use core::ffi::c_int; diff --git a/ulib/axlibc/src/lib.rs b/ulib/axlibc/src/lib.rs index 7bb8cc80c..b7d718580 100644 --- a/ulib/axlibc/src/lib.rs +++ b/ulib/axlibc/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! [ArceOS] user program library for C apps. //! //! ## Cargo Features diff --git a/ulib/axlibc/src/malloc.rs b/ulib/axlibc/src/malloc.rs index f635b7ff0..7a4693d03 100644 --- a/ulib/axlibc/src/malloc.rs +++ b/ulib/axlibc/src/malloc.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Provides the corresponding malloc(size_t) and free(size_t) when using the C user program. //! //! The normal malloc(size_t) and free(size_t) are provided by the library malloc.h, and diff --git a/ulib/axlibc/src/mktime.rs b/ulib/axlibc/src/mktime.rs index 1caf3325b..f614f6dbb 100644 --- a/ulib/axlibc/src/mktime.rs +++ b/ulib/axlibc/src/mktime.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; use crate::ctypes; diff --git a/ulib/axlibc/src/net.rs b/ulib/axlibc/src/net.rs index e09218157..66aa47393 100644 --- a/ulib/axlibc/src/net.rs +++ b/ulib/axlibc/src/net.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use arceos_posix_api::{ sys_accept, sys_bind, sys_connect, sys_freeaddrinfo, sys_getaddrinfo, sys_getpeername, sys_getsockname, sys_listen, sys_recv, sys_recvfrom, sys_send, sys_sendto, sys_shutdown, diff --git a/ulib/axlibc/src/pipe.rs b/ulib/axlibc/src/pipe.rs index 2bed253c0..34f66b379 100644 --- a/ulib/axlibc/src/pipe.rs +++ b/ulib/axlibc/src/pipe.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; use arceos_posix_api::sys_pipe; diff --git a/ulib/axlibc/src/pthread.rs b/ulib/axlibc/src/pthread.rs index b170b8b7a..a9ae10c9d 100644 --- a/ulib/axlibc/src/pthread.rs +++ b/ulib/axlibc/src/pthread.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::{ctypes, utils::e}; use arceos_posix_api as api; use core::ffi::{c_int, c_void}; diff --git a/ulib/axlibc/src/rand.rs b/ulib/axlibc/src/rand.rs index 682f4231c..f28c337d6 100644 --- a/ulib/axlibc/src/rand.rs +++ b/ulib/axlibc/src/rand.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Random number generator. use core::{ diff --git a/ulib/axlibc/src/resource.rs b/ulib/axlibc/src/resource.rs index 20e013e50..3a772b986 100644 --- a/ulib/axlibc/src/resource.rs +++ b/ulib/axlibc/src/resource.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; use arceos_posix_api::{sys_getrlimit, sys_setrlimit}; diff --git a/ulib/axlibc/src/setjmp.rs b/ulib/axlibc/src/setjmp.rs index aed4441ff..76dde2785 100644 --- a/ulib/axlibc/src/setjmp.rs +++ b/ulib/axlibc/src/setjmp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; use crate::ctypes; diff --git a/ulib/axlibc/src/strftime.rs b/ulib/axlibc/src/strftime.rs index aa3c010a3..3d24daae7 100644 --- a/ulib/axlibc/src/strftime.rs +++ b/ulib/axlibc/src/strftime.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use alloc::string::String; use core::{ffi::c_char, fmt}; diff --git a/ulib/axlibc/src/strtod.rs b/ulib/axlibc/src/strtod.rs index d93087892..7d8bc4adc 100644 --- a/ulib/axlibc/src/strtod.rs +++ b/ulib/axlibc/src/strtod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::{c_char, c_double, c_float, c_int}; macro_rules! strto_float_impl { diff --git a/ulib/axlibc/src/sys.rs b/ulib/axlibc/src/sys.rs index 253d76f1a..240fa1ff8 100644 --- a/ulib/axlibc/src/sys.rs +++ b/ulib/axlibc/src/sys.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use arceos_posix_api::sys_sysconf; use core::ffi::{c_int, c_long}; diff --git a/ulib/axlibc/src/time.rs b/ulib/axlibc/src/time.rs index f478cd7f3..684fa6e62 100644 --- a/ulib/axlibc/src/time.rs +++ b/ulib/axlibc/src/time.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use arceos_posix_api::{sys_clock_gettime, sys_nanosleep}; use core::ffi::c_int; diff --git a/ulib/axlibc/src/unistd.rs b/ulib/axlibc/src/unistd.rs index 46c81bdd7..c2d97986f 100644 --- a/ulib/axlibc/src/unistd.rs +++ b/ulib/axlibc/src/unistd.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use arceos_posix_api::{sys_exit, sys_getpid}; use core::ffi::c_int; diff --git a/ulib/axlibc/src/utils.rs b/ulib/axlibc/src/utils.rs index 730f8c3de..89dc56568 100644 --- a/ulib/axlibc/src/utils.rs +++ b/ulib/axlibc/src/utils.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use core::ffi::c_int; pub fn e(ret: c_int) -> c_int { diff --git a/ulib/axstd/src/env.rs b/ulib/axstd/src/env.rs index 13c06e2cb..97411ac71 100644 --- a/ulib/axstd/src/env.rs +++ b/ulib/axstd/src/env.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Inspection and manipulation of the process’s environment. #[cfg(feature = "fs")] diff --git a/ulib/axstd/src/fs/dir.rs b/ulib/axstd/src/fs/dir.rs index bf49cc85a..99532acd1 100644 --- a/ulib/axstd/src/fs/dir.rs +++ b/ulib/axstd/src/fs/dir.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + extern crate alloc; use alloc::string::String; diff --git a/ulib/axstd/src/fs/file.rs b/ulib/axstd/src/fs/file.rs index 6984057cc..cdd697a87 100644 --- a/ulib/axstd/src/fs/file.rs +++ b/ulib/axstd/src/fs/file.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::io::{prelude::*, Result, SeekFrom}; use core::fmt; diff --git a/ulib/axstd/src/fs/mod.rs b/ulib/axstd/src/fs/mod.rs index 5308045b9..b5a9be7d4 100644 --- a/ulib/axstd/src/fs/mod.rs +++ b/ulib/axstd/src/fs/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Filesystem manipulation operations. mod dir; diff --git a/ulib/axstd/src/io/mod.rs b/ulib/axstd/src/io/mod.rs index 7a0cf1fc1..411ae5025 100644 --- a/ulib/axstd/src/io/mod.rs +++ b/ulib/axstd/src/io/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Traits, helpers, and type definitions for core I/O functionality. mod stdio; diff --git a/ulib/axstd/src/io/stdio.rs b/ulib/axstd/src/io/stdio.rs index 0b07f4bb6..625d5dc48 100644 --- a/ulib/axstd/src/io/stdio.rs +++ b/ulib/axstd/src/io/stdio.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use crate::io::{self, prelude::*, BufReader}; use crate::sync::{Mutex, MutexGuard}; diff --git a/ulib/axstd/src/lib.rs b/ulib/axstd/src/lib.rs index ced516cd7..bf0021277 100644 --- a/ulib/axstd/src/lib.rs +++ b/ulib/axstd/src/lib.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! # The ArceOS Standard Library //! //! The [ArceOS] Standard Library is a mini-std library, with an interface similar diff --git a/ulib/axstd/src/macros.rs b/ulib/axstd/src/macros.rs index c7cd6535e..02cd3d09a 100644 --- a/ulib/axstd/src/macros.rs +++ b/ulib/axstd/src/macros.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Standard library macros /// Prints to the standard output. diff --git a/ulib/axstd/src/net/mod.rs b/ulib/axstd/src/net/mod.rs index 3d789cebb..9d519f8af 100644 --- a/ulib/axstd/src/net/mod.rs +++ b/ulib/axstd/src/net/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Networking primitives for TCP/UDP communication. //! //! This module provides networking functionality for the Transmission Control and User diff --git a/ulib/axstd/src/net/socket_addr.rs b/ulib/axstd/src/net/socket_addr.rs index 56f7e0b4a..1193203cf 100644 --- a/ulib/axstd/src/net/socket_addr.rs +++ b/ulib/axstd/src/net/socket_addr.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + extern crate alloc; use crate::io; diff --git a/ulib/axstd/src/net/tcp.rs b/ulib/axstd/src/net/tcp.rs index f527f1467..16ce3d98f 100644 --- a/ulib/axstd/src/net/tcp.rs +++ b/ulib/axstd/src/net/tcp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use super::{SocketAddr, ToSocketAddrs}; use crate::io::{self, prelude::*}; diff --git a/ulib/axstd/src/net/udp.rs b/ulib/axstd/src/net/udp.rs index 65df9e8ff..5c2bc160e 100644 --- a/ulib/axstd/src/net/udp.rs +++ b/ulib/axstd/src/net/udp.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + use super::{SocketAddr, ToSocketAddrs}; use crate::io; diff --git a/ulib/axstd/src/os.rs b/ulib/axstd/src/os.rs index d1bdf8258..88a47fe3c 100644 --- a/ulib/axstd/src/os.rs +++ b/ulib/axstd/src/os.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! OS-specific functionality. /// ArceOS-specific definitions. diff --git a/ulib/axstd/src/process.rs b/ulib/axstd/src/process.rs index 28349d224..aa6433224 100644 --- a/ulib/axstd/src/process.rs +++ b/ulib/axstd/src/process.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A module for working with processes. //! //! Since ArceOS is a unikernel, there is no concept of processes. The diff --git a/ulib/axstd/src/sync/mod.rs b/ulib/axstd/src/sync/mod.rs index 75f003fa5..06882e232 100644 --- a/ulib/axstd/src/sync/mod.rs +++ b/ulib/axstd/src/sync/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Useful synchronization primitives. #[doc(no_inline)] diff --git a/ulib/axstd/src/sync/mutex.rs b/ulib/axstd/src/sync/mutex.rs index 727324b74..4d5f14f21 100644 --- a/ulib/axstd/src/sync/mutex.rs +++ b/ulib/axstd/src/sync/mutex.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! A naïve sleeping mutex. use core::cell::UnsafeCell; diff --git a/ulib/axstd/src/thread/mod.rs b/ulib/axstd/src/thread/mod.rs index 452d2cc5e..631517e18 100644 --- a/ulib/axstd/src/thread/mod.rs +++ b/ulib/axstd/src/thread/mod.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Native threads. #[cfg(feature = "multitask")] diff --git a/ulib/axstd/src/thread/multi.rs b/ulib/axstd/src/thread/multi.rs index 5ac8c3e5d..0cfd22eb5 100644 --- a/ulib/axstd/src/thread/multi.rs +++ b/ulib/axstd/src/thread/multi.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Thread APIs for multi-threading configuration. extern crate alloc; diff --git a/ulib/axstd/src/time.rs b/ulib/axstd/src/time.rs index 3b6b5929b..f1153b268 100644 --- a/ulib/axstd/src/time.rs +++ b/ulib/axstd/src/time.rs @@ -1,3 +1,12 @@ +/* Copyright (c) [2023] [Syswonder Community] + * [Rukos] is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + //! Temporal quantification. use arceos_api::time::AxTimeValue;