1 // Copyright 2020 The Pigweed Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 // use this file except in compliance with the License. You may obtain a copy of 5 // the License at 6 // 7 // https://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 // License for the specific language governing permissions and limitations under 13 // the License. 14 15 #include "pw_thread/test_threads.h" 16 17 #include "pw_thread_stl/options.h" 18 19 namespace pw::thread::test { 20 21 // The STL doesn't offer any options so the default constructed options are used 22 // directly. 23 TestOptionsThread0()24const Options& TestOptionsThread0() { 25 static constexpr stl::Options thread_0_options; 26 return thread_0_options; 27 } 28 TestOptionsThread1()29const Options& TestOptionsThread1() { 30 static constexpr stl::Options thread_1_options; 31 return thread_1_options; 32 } 33 34 // Thanks to the dynamic allocation, there's no need to wait here as there's 35 // no re-use of contexts. In addition we have a very large heap so we expect 36 // the risk to be minimal to non-existent for heap exhaustion to occur if this 37 // test is run back to back. WaitUntilDetachedThreadsCleanedUp()38void WaitUntilDetachedThreadsCleanedUp() {} 39 40 } // namespace pw::thread::test 41