mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			rtos: Tag non value type as NonCopyable.
The types marked are: Mail, MemoryPool, Mutex, Queue, RtosTimer and Semaphore.pull/4594/head
							parent
							
								
									7a1e2cfc9a
								
							
						
					
					
						commit
						4d5f805cde
					
				| 
						 | 
				
			
			@ -31,6 +31,8 @@
 | 
			
		|||
#include "rtx_lib.h"
 | 
			
		||||
#include "mbed_rtos1_types.h"
 | 
			
		||||
 | 
			
		||||
#include "platform/NonCopyable.h"
 | 
			
		||||
 | 
			
		||||
using namespace rtos;
 | 
			
		||||
 | 
			
		||||
namespace rtos {
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +49,7 @@ namespace rtos {
 | 
			
		|||
 both for the mbed OS and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
 | 
			
		||||
*/
 | 
			
		||||
template<typename T, uint32_t queue_sz>
 | 
			
		||||
class Mail {
 | 
			
		||||
class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
 | 
			
		||||
public:
 | 
			
		||||
    /** Create and Initialise Mail queue. */
 | 
			
		||||
    Mail() { };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,6 +28,7 @@
 | 
			
		|||
#include "cmsis_os2.h"
 | 
			
		||||
#include "mbed_rtos1_types.h"
 | 
			
		||||
#include "mbed_rtos_storage.h"
 | 
			
		||||
#include "platform/NonCopyable.h"
 | 
			
		||||
 | 
			
		||||
namespace rtos {
 | 
			
		||||
/** \addtogroup rtos */
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +43,7 @@ namespace rtos {
 | 
			
		|||
 both for the mbed OS and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
 | 
			
		||||
*/
 | 
			
		||||
template<typename T, uint32_t pool_sz>
 | 
			
		||||
class MemoryPool {
 | 
			
		||||
class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
 | 
			
		||||
public:
 | 
			
		||||
    /** Create and Initialize a memory pool. */
 | 
			
		||||
    MemoryPool() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,8 @@
 | 
			
		|||
#include "mbed_rtos1_types.h"
 | 
			
		||||
#include "mbed_rtos_storage.h"
 | 
			
		||||
 | 
			
		||||
#include "platform/NonCopyable.h"
 | 
			
		||||
 | 
			
		||||
namespace rtos {
 | 
			
		||||
/** \addtogroup rtos */
 | 
			
		||||
/** @{*/
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +40,7 @@ namespace rtos {
 | 
			
		|||
 Memory considerations: The mutex control structures will be created on current thread's stack, both for the mbed OS
 | 
			
		||||
 and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
 | 
			
		||||
*/
 | 
			
		||||
class Mutex {
 | 
			
		||||
class Mutex : private mbed::NonCopyable<Mutex> {
 | 
			
		||||
public:
 | 
			
		||||
    /** Create and Initialize a Mutex object */
 | 
			
		||||
    Mutex();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,6 +28,7 @@
 | 
			
		|||
#include "cmsis_os2.h"
 | 
			
		||||
#include "mbed_rtos_storage.h"
 | 
			
		||||
#include "platform/mbed_error.h"
 | 
			
		||||
#include "platform/NonCopyable.h"
 | 
			
		||||
#include "mbed_rtos1_types.h"
 | 
			
		||||
 | 
			
		||||
namespace rtos {
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +46,7 @@ namespace rtos {
 | 
			
		|||
 and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
 | 
			
		||||
*/
 | 
			
		||||
template<typename T, uint32_t queue_sz>
 | 
			
		||||
class Queue {
 | 
			
		||||
class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
 | 
			
		||||
public:
 | 
			
		||||
    /** Create and initialize a message Queue. */
 | 
			
		||||
    Queue() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,6 +26,7 @@
 | 
			
		|||
#include "cmsis_os2.h"
 | 
			
		||||
#include "rtx_lib.h"
 | 
			
		||||
#include "platform/Callback.h"
 | 
			
		||||
#include "platform/NonCopyable.h"
 | 
			
		||||
#include "platform/mbed_toolchain.h"
 | 
			
		||||
#include "mbed_rtos1_types.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +80,7 @@ namespace rtos {
 | 
			
		|||
 Memory considerations: The timer control structures will be created on current thread's stack, both for the mbed OS
 | 
			
		||||
 and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
 | 
			
		||||
*/
 | 
			
		||||
class RtosTimer {
 | 
			
		||||
class RtosTimer : private mbed::NonCopyable<RtosTimer> {
 | 
			
		||||
public:
 | 
			
		||||
    /** Create timer.
 | 
			
		||||
      @param   func      function to be executed by this timer.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,6 +26,7 @@
 | 
			
		|||
#include "cmsis_os2.h"
 | 
			
		||||
#include "mbed_rtos1_types.h"
 | 
			
		||||
#include "mbed_rtos_storage.h"
 | 
			
		||||
#include "platform/NonCopyable.h"
 | 
			
		||||
 | 
			
		||||
namespace rtos {
 | 
			
		||||
/** \addtogroup rtos */
 | 
			
		||||
| 
						 | 
				
			
			@ -37,7 +38,7 @@ namespace rtos {
 | 
			
		|||
 * Memory considerations: The semaphore control structures will be created on current thread's stack, both for the mbed OS
 | 
			
		||||
 * and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
 | 
			
		||||
 */
 | 
			
		||||
class Semaphore {
 | 
			
		||||
class Semaphore : private mbed::NonCopyable<Semaphore> {
 | 
			
		||||
public:
 | 
			
		||||
    /** Create and Initialize a Semaphore object used for managing resources.
 | 
			
		||||
      @param count      number of available resources; maximum index value is (count-1). (default: 0).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue