Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
aq_critical.h
00001 // ---------------------------------------------------------------------------- 00002 // Copyright 2015-2017 ARM Ltd. 00003 // 00004 // SPDX-License-Identifier: Apache-2.0 00005 // 00006 // Licensed under the Apache License, Version 2.0 (the "License"); 00007 // you may not use this file except in compliance with the License. 00008 // You may obtain a copy of the License at 00009 // 00010 // http://www.apache.org/licenses/LICENSE-2.0 00011 // 00012 // Unless required by applicable law or agreed to in writing, software 00013 // distributed under the License is distributed on an "AS IS" BASIS, 00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 // See the License for the specific language governing permissions and 00016 // limitations under the License. 00017 // ---------------------------------------------------------------------------- 00018 00019 #ifndef __ATOMIC_QUEUE_CRITICAL_H__ 00020 #define __ATOMIC_QUEUE_CRITICAL_H__ 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 /** Mark the start of a critical section 00027 * 00028 * This function should be called to mark the start of a critical section of code. 00029 * \note 00030 * NOTES: 00031 * 1) The use of this style of critical section is targetted at C based implementations. 00032 * 2) These critical sections can be nested. 00033 * 3) The interrupt enable state on entry to the first critical section (of a nested set, or single 00034 * section) will be preserved on exit from the section. 00035 * 4) This implementation will currently only work on code running in privileged mode. 00036 */ 00037 void aq_critical_section_enter(); 00038 00039 /** Mark the end of a critical section 00040 * 00041 * This function should be called to mark the end of a critical section of code. 00042 * \note 00043 * NOTES: 00044 * 1) The use of this style of critical section is targetted at C based implementations. 00045 * 2) These critical sections can be nested. 00046 * 3) The interrupt enable state on entry to the first critical section (of a nested set, or single 00047 * section) will be preserved on exit from the section. 00048 * 4) This implementation will currently only work on code running in privileged mode. 00049 */ 00050 void aq_critical_section_exit(); 00051 00052 #ifdef __cplusplus 00053 } // extern "C" 00054 #endif 00055 00056 00057 #endif // __ATOMIC_QUEUE_CRITICAL_H__
Generated on Tue Jul 12 2022 19:01:32 by 1.7.2