[PATCH 4/6] basdefs.h: Add and use RTEMS_DEPRECATED

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Oct 16 06:59:33 UTC 2015


---
 c/src/librtems++/include/rtems++/rtemsTask.h   |  4 ++--
 cpukit/libblock/include/rtems/ide_part_table.h |  6 +++---
 cpukit/rtems/include/rtems/rtems/clock.h       |  2 +-
 cpukit/rtems/include/rtems/rtems/tasks.h       | 12 ++++++------
 cpukit/rtems/include/rtems/rtems/tasksimpl.h   |  2 +-
 cpukit/sapi/include/confdefs.h                 |  2 +-
 cpukit/sapi/include/rtems/extension.h          |  2 +-
 cpukit/sapi/include/rtems/io.h                 |  2 +-
 cpukit/score/include/rtems/score/basedefs.h    |  8 +++++---
 cpukit/score/include/rtems/score/userext.h     |  2 +-
 10 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/c/src/librtems++/include/rtems++/rtemsTask.h b/c/src/librtems++/include/rtems++/rtemsTask.h
index 6a500b0..3aac25d 100644
--- a/c/src/librtems++/include/rtems++/rtemsTask.h
+++ b/c/src/librtems++/include/rtems++/rtemsTask.h
@@ -127,9 +127,9 @@ public:
 
   // notepad control
   const rtems_status_code get_note(const uint32_t notepad,
-                                   uint32_t& note) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+                                   uint32_t& note) RTEMS_DEPRECATED;
   const rtems_status_code set_note(const uint32_t notepad,
-                                   const uint32_t note) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+                                   const uint32_t note) RTEMS_DEPRECATED;
 
   // object id, and name
   const rtems_id id_is() const { return id; }
diff --git a/cpukit/libblock/include/rtems/ide_part_table.h b/cpukit/libblock/include/rtems/ide_part_table.h
index 261135c..c638e28 100644
--- a/cpukit/libblock/include/rtems/ide_part_table.h
+++ b/cpukit/libblock/include/rtems/ide_part_table.h
@@ -167,7 +167,7 @@ extern "C" {
  */
 void rtems_ide_part_table_free(
   rtems_disk_desc_t *disk_desc
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 
 /*
@@ -188,7 +188,7 @@ void rtems_ide_part_table_free(
 rtems_status_code rtems_ide_part_table_get(
   const char *dev_name,
   rtems_disk_desc_t *disk_desc
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 
 /*
@@ -206,7 +206,7 @@ rtems_status_code rtems_ide_part_table_get(
  */
 rtems_status_code rtems_ide_part_table_initialize(
   const char *dev_name
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 #ifdef __cplusplus
 }
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h
index 18bbc62..453d001 100644
--- a/cpukit/rtems/include/rtems/rtems/clock.h
+++ b/cpukit/rtems/include/rtems/rtems/clock.h
@@ -91,7 +91,7 @@ typedef enum {
 rtems_status_code rtems_clock_get(
   rtems_clock_get_options  option,
   void                    *time_buffer
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 /**
  * @brief Obtain Current Time of Day (Classic TOD)
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index dc12d0b..1ad537d 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -287,7 +287,7 @@ rtems_status_code rtems_task_get_note(
   rtems_id    id,
   uint32_t    notepad,
   uint32_t   *note
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 /**
  * @brief RTEMS Set Task Note
@@ -310,7 +310,7 @@ rtems_status_code rtems_task_set_note(
   rtems_id   id,
   uint32_t   notepad,
   uint32_t   note
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 /**
  * @brief RTEMS Task Mode
@@ -472,7 +472,7 @@ rtems_status_code rtems_task_variable_add(
   rtems_id  tid,
   void    **ptr,
   void    (*dtor)(void *)
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 /**
  *  @brief Get a per-task variable
@@ -487,7 +487,7 @@ rtems_status_code rtems_task_variable_get(
   rtems_id tid,
   void **ptr,
   void **result
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 /**
  *  @brief RTEMS Delete Task Variable
@@ -501,7 +501,7 @@ rtems_status_code rtems_task_variable_get(
 rtems_status_code rtems_task_variable_delete(
   rtems_id  tid,
   void    **ptr
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 #endif
 
 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
@@ -678,7 +678,7 @@ typedef struct {
    *
    *  @note MUST BE LAST ENTRY.
    */
-  uint32_t Notepads[ RTEMS_ZERO_LENGTH_ARRAY ] RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+  uint32_t Notepads[ RTEMS_ZERO_LENGTH_ARRAY ] RTEMS_DEPRECATED;
 }  RTEMS_API_Control;
 
 /**
diff --git a/cpukit/rtems/include/rtems/rtems/tasksimpl.h b/cpukit/rtems/include/rtems/rtems/tasksimpl.h
index d35f681..5a493d7 100644
--- a/cpukit/rtems/include/rtems/rtems/tasksimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/tasksimpl.h
@@ -78,7 +78,7 @@ void _RTEMS_tasks_Initialize_user_tasks( void );
 void _RTEMS_Tasks_Invoke_task_variable_dtor(
   Thread_Control        *the_thread,
   rtems_task_variable_t *tvp
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 #endif
 
 RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void)
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 66c8c7e..47d7026 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -3302,7 +3302,7 @@ const rtems_libio_helper rtems_fs_init_helper =
     } Scheduler;
     RTEMS_API_Control API_RTEMS;
     #if defined(CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS)
-      uint32_t Notepads[ RTEMS_NUMBER_NOTEPADS ] RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+      uint32_t Notepads[ RTEMS_NUMBER_NOTEPADS ] RTEMS_DEPRECATED;
     #endif
     #ifdef RTEMS_POSIX_API
       POSIX_API_Control API_POSIX;
diff --git a/cpukit/sapi/include/rtems/extension.h b/cpukit/sapi/include/rtems/extension.h
index 950af8e..d3b0aa3 100644
--- a/cpukit/sapi/include/rtems/extension.h
+++ b/cpukit/sapi/include/rtems/extension.h
@@ -31,7 +31,7 @@ typedef struct {
 }   Extension_Control;
 
 typedef User_extensions_routine
-  rtems_extension RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+  rtems_extension RTEMS_DEPRECATED;
 
 /**
  * @defgroup ClassicUserExtensions User Extensions
diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h
index 843201c..7a105ce 100644
--- a/cpukit/sapi/include/rtems/io.h
+++ b/cpukit/sapi/include/rtems/io.h
@@ -248,7 +248,7 @@ typedef struct {
 rtems_status_code rtems_io_lookup_name(
     const char           *name,
     rtems_driver_name_t  *device_info
-) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+) RTEMS_DEPRECATED;
 
 extern const size_t _IO_Number_of_drivers;
 
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 9e6bc0a..831a40b 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -184,12 +184,14 @@
  *  with this attribute will be used.
  */
 #ifdef __GNUC__
-  #define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE \
-     __attribute__ ((deprecated))
+  #define RTEMS_DEPRECATED __attribute__((__deprecated__))
 #else
-  #define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE
+  #define RTEMS_DEPRECATED
 #endif
 
+/* Provided for backward compatibility */
+#define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE RTEMS_DEPRECATED
+
 /**
  * @brief Instructs the compiler to place a specific variable or function in
  * the specified section.
diff --git a/cpukit/score/include/rtems/score/userext.h b/cpukit/score/include/rtems/score/userext.h
index 2bd8f8a..e626f2f 100644
--- a/cpukit/score/include/rtems/score/userext.h
+++ b/cpukit/score/include/rtems/score/userext.h
@@ -26,7 +26,7 @@
 extern "C" {
 #endif
 
-typedef void User_extensions_routine RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
+typedef void User_extensions_routine RTEMS_DEPRECATED;
 
 /**
  * @defgroup ScoreUserExt User Extension Handler
-- 
1.8.4.5




More information about the devel mailing list