From 04f57f20e3305f46665307a7c9a34bc61bddde9e Mon Sep 17 00:00:00 2001 From: "Cliff L. Biffle" Date: Sun, 5 May 2024 08:58:29 -0700 Subject: [PATCH] Add MPL license headers to source files. I always dislike having headers like this, but for MPL2 in particular this is the right thing to do, since it applies at a file level. --- examples/rp2040/minimal/src/main.rs | 4 ++++ examples/stm32f4/blinky/src/main.rs | 4 ++++ examples/stm32f4/minimal/src/main.rs | 4 ++++ examples/stm32f4/uart-echo/src/main.rs | 4 ++++ examples/stm32g031/minimal/src/main.rs | 4 ++++ examples/stm32h7/minimal/src/main.rs | 4 ++++ examples/stm32h7/uart-echo/src/main.rs | 4 ++++ handoff/src/lib.rs | 4 ++++ list/src/lib.rs | 4 ++++ os/build.rs | 4 ++++ os/src/atomic.rs | 4 ++++ os/src/exec.rs | 4 ++++ os/src/lib.rs | 4 ++++ os/src/list.rs | 4 ++++ os/src/mutex.rs | 4 ++++ os/src/spsc.rs | 4 ++++ os/src/time.rs | 4 ++++ os/src/util.rs | 4 ++++ rwlock/src/lib.rs | 4 ++++ semaphore/src/lib.rs | 4 ++++ testsuite/lm3s6965/src/main.rs | 4 ++++ testsuite/src/handoff.rs | 4 ++++ testsuite/src/lib.rs | 4 ++++ testsuite/src/list.rs | 4 ++++ testsuite/src/mutex.rs | 4 ++++ testsuite/src/rwlock.rs | 4 ++++ testsuite/src/semaphore.rs | 4 ++++ testsuite/src/spsc.rs | 4 ++++ testsuite/stm32f3/src/main.rs | 4 ++++ testsuite/stm32f4/src/main.rs | 4 ++++ testsuite/stm32g0/src/main.rs | 4 ++++ 31 files changed, 124 insertions(+) diff --git a/examples/rp2040/minimal/src/main.rs b/examples/rp2040/minimal/src/main.rs index 07b519d..0e4ed6d 100644 --- a/examples/rp2040/minimal/src/main.rs +++ b/examples/rp2040/minimal/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Minimal example of using `lilos` to blink an LED at 1Hz on the //! Raspberry Pi Pico board. //! diff --git a/examples/stm32f4/blinky/src/main.rs b/examples/stm32f4/blinky/src/main.rs index 104cf74..df01bb4 100644 --- a/examples/stm32f4/blinky/src/main.rs +++ b/examples/stm32f4/blinky/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! More complex LED-blinking demo using parameterized tasks. //! //! This blinks four LEDs on the STM32F4DISCOVERY board. Each LED uses the same diff --git a/examples/stm32f4/minimal/src/main.rs b/examples/stm32f4/minimal/src/main.rs index dcd57ef..8498802 100644 --- a/examples/stm32f4/minimal/src/main.rs +++ b/examples/stm32f4/minimal/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Minimal example of using `lilos` to blink an LED at 1Hz on the //! STM32F4DISCOVERY board. //! diff --git a/examples/stm32f4/uart-echo/src/main.rs b/examples/stm32f4/uart-echo/src/main.rs index fdec567..aa34908 100644 --- a/examples/stm32f4/uart-echo/src/main.rs +++ b/examples/stm32f4/uart-echo/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! An example of receiving and retransmitting bytes through a UART on the //! STM32F4xx. //! diff --git a/examples/stm32g031/minimal/src/main.rs b/examples/stm32g031/minimal/src/main.rs index c2b550a..bb3970f 100644 --- a/examples/stm32g031/minimal/src/main.rs +++ b/examples/stm32g031/minimal/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Minimal example of using `lilos` to blink an LED at 1Hz on the //! NUCLEO-STM32G031 board. //! diff --git a/examples/stm32h7/minimal/src/main.rs b/examples/stm32h7/minimal/src/main.rs index 1c41946..e6c16ac 100644 --- a/examples/stm32h7/minimal/src/main.rs +++ b/examples/stm32h7/minimal/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Minimal example of using `lilos` to blink an LED at 1Hz on the //! STM32H7 NUCLEO board. //! diff --git a/examples/stm32h7/uart-echo/src/main.rs b/examples/stm32h7/uart-echo/src/main.rs index 659df71..3fcc21f 100644 --- a/examples/stm32h7/uart-echo/src/main.rs +++ b/examples/stm32h7/uart-echo/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! An example of receiving and retransmitting bytes through a UART on the //! STM32H7xx. //! diff --git a/handoff/src/lib.rs b/handoff/src/lib.rs index a3b568a..58ad881 100644 --- a/handoff/src/lib.rs +++ b/handoff/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Mechanism for handing data from one task to another, minimizing copies. //! //! This crate provides the `Handoff` abstraction for `lilos`. diff --git a/list/src/lib.rs b/list/src/lib.rs index 7f56ef4..410ed48 100644 --- a/list/src/lib.rs +++ b/list/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A no-allocation wait-list and associated utility code. //! //! This crates provides a doubly-linked intrusive list for tracking timers or diff --git a/os/build.rs b/os/build.rs index c59a6fd..2cb65c7 100644 --- a/os/build.rs +++ b/os/build.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + fn main() { match std::env::var("TARGET").unwrap().as_str() { "thumbv7m-none-eabi" | "thumbv7em-none-eabi" | "thumbv7em-none-eabihf" => { diff --git a/os/src/atomic.rs b/os/src/atomic.rs index a83eafb..d1e39ae 100644 --- a/os/src/atomic.rs +++ b/os/src/atomic.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A collection of atomic "polyfill" routines, to use a term from JavaScript. //! //! ARMv6-M processors like the Cortex-M0 don't support the fancier atomic diff --git a/os/src/exec.rs b/os/src/exec.rs index 74a0673..39501dd 100644 --- a/os/src/exec.rs +++ b/os/src/exec.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! The async runtime executor, plus inter-task communication tools. //! //! **Note:** for our purposes, a _task_ is an independent top-level future diff --git a/os/src/lib.rs b/os/src/lib.rs index 3906496..7f8c184 100644 --- a/os/src/lib.rs +++ b/os/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A simple but powerful `async` RTOS based around Rust `Future`s. //! //! This provides a lightweight operating environment for running async Rust diff --git a/os/src/list.rs b/os/src/list.rs index 7ec40ce..1c185af 100644 --- a/os/src/list.rs +++ b/os/src/list.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Doubly-linked intrusive lists for scheduling and waking (old version). //! //! **Please use the `lilos_list` crate instead. It's better in literally every diff --git a/os/src/mutex.rs b/os/src/mutex.rs index bcf5e06..01d6024 100644 --- a/os/src/mutex.rs +++ b/os/src/mutex.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Fair mutex that must be pinned. //! //! This implements a mutex (a kind of lock) guarding a value of type `T`. This diff --git a/os/src/spsc.rs b/os/src/spsc.rs index 5c02606..2dd27c7 100644 --- a/os/src/spsc.rs +++ b/os/src/spsc.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A queue for moving data from one future/task into another. //! //! This is a "single-producer, single-consumer" queue that splits into separate diff --git a/os/src/time.rs b/os/src/time.rs index 964247c..2f365c5 100644 --- a/os/src/time.rs +++ b/os/src/time.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Timekeeping using the SysTick Timer. //! //! **Note:** this entire module is only available if the `systick` feature is diff --git a/os/src/util.rs b/os/src/util.rs index 5eb000a..b93b13d 100644 --- a/os/src/util.rs +++ b/os/src/util.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Utility code for use by applications. //! //! Like `atomic`, this module exposes odds and ends that might be useful for diff --git a/rwlock/src/lib.rs b/rwlock/src/lib.rs index 18ae1bc..9c59608 100644 --- a/rwlock/src/lib.rs +++ b/rwlock/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A [read-write lock] for use with [`lilos`]. //! //! There's a small family of related types in this here crate: diff --git a/semaphore/src/lib.rs b/semaphore/src/lib.rs index 58c76e5..79ec418 100644 --- a/semaphore/src/lib.rs +++ b/semaphore/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A [counting semaphore] for use with [`lilos`]. //! //! See the docs on [`Semaphore`] for more details. diff --git a/testsuite/lm3s6965/src/main.rs b/testsuite/lm3s6965/src/main.rs index 4ec5f16..6b8b6ea 100644 --- a/testsuite/lm3s6965/src/main.rs +++ b/testsuite/lm3s6965/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! OS test suite, LM3S6965 wrapper. #![no_std] diff --git a/testsuite/src/handoff.rs b/testsuite/src/handoff.rs index 1203cfc..e2c9152 100644 --- a/testsuite/src/handoff.rs +++ b/testsuite/src/handoff.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use lilos_handoff::Handoff; pub async fn test_create_drop() { diff --git a/testsuite/src/lib.rs b/testsuite/src/lib.rs index 4d84fbc..338aa84 100644 --- a/testsuite/src/lib.rs +++ b/testsuite/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! OS test suite. //! //! The test suite is SoC-independent. diff --git a/testsuite/src/list.rs b/testsuite/src/list.rs index 359e853..4ea2f36 100644 --- a/testsuite/src/list.rs +++ b/testsuite/src/list.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Tests for the `List` and `Node` types. #![allow(clippy::bool_assert_comparison)] diff --git a/testsuite/src/mutex.rs b/testsuite/src/mutex.rs index b6f0086..1b27f98 100644 --- a/testsuite/src/mutex.rs +++ b/testsuite/src/mutex.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use core::pin::{Pin, pin}; use core::task::Poll; diff --git a/testsuite/src/rwlock.rs b/testsuite/src/rwlock.rs index 598e56c..b123734 100644 --- a/testsuite/src/rwlock.rs +++ b/testsuite/src/rwlock.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use core::pin::pin; use lilos_rwlock::RwLock; diff --git a/testsuite/src/semaphore.rs b/testsuite/src/semaphore.rs index c61ba38..01d3a16 100644 --- a/testsuite/src/semaphore.rs +++ b/testsuite/src/semaphore.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use core::pin::pin; use lilos_semaphore::{Semaphore, ScopedSemaphore}; diff --git a/testsuite/src/spsc.rs b/testsuite/src/spsc.rs index 797d2ed..314d7f8 100644 --- a/testsuite/src/spsc.rs +++ b/testsuite/src/spsc.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use core::cell::Cell; use core::mem::MaybeUninit; use core::ptr::addr_of_mut; diff --git a/testsuite/stm32f3/src/main.rs b/testsuite/stm32f3/src/main.rs index d2101c7..54deefd 100644 --- a/testsuite/stm32f3/src/main.rs +++ b/testsuite/stm32f3/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! OS test suite, STM32F303 wrapper. #![no_std] diff --git a/testsuite/stm32f4/src/main.rs b/testsuite/stm32f4/src/main.rs index 9e3fa35..a65349a 100644 --- a/testsuite/stm32f4/src/main.rs +++ b/testsuite/stm32f4/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! OS test suite, STM32F407 wrapper. #![no_std] diff --git a/testsuite/stm32g0/src/main.rs b/testsuite/stm32g0/src/main.rs index 82705ce..4a1a758 100644 --- a/testsuite/stm32g0/src/main.rs +++ b/testsuite/stm32g0/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! OS test suite, STM32G0 wrapper. #![no_std]