[PATCH] confdefs: replace disable with enable option for notepads
Gedare Bloom
gedare at rtems.org
Fri Mar 6 17:43:47 UTC 2015
Make notepads disabled by default. The previous option
CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is now unused and
will emit a compile-time warning. A new option
CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is available to turn
on notepads, but it also will emit a compile-time warning
to indicate that notepads are deprecated.
Closes #2265
---
cpukit/sapi/include/confdefs.h | 8 ++++++--
doc/user/conf.t | 46 +++++++++++++++++++++++++++++++++++++-----
2 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 7d9e3b9..7c520ac 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -1810,7 +1810,11 @@ const rtems_libio_helper rtems_fs_init_helper =
#define CONFIGURE_TASKS \
(CONFIGURE_MAXIMUM_TASKS + CONFIGURE_LIBBLOCK_TASKS)
- #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
+ #if defined(CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS)
+ #warning "CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is deprecated and will be removed."
+ #endif
+ #if defined(CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS)
+ #warning "CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is deprecated and will be removed."
#define CONFIGURE_NOTEPADS_ENABLED TRUE
#else
#define CONFIGURE_NOTEPADS_ENABLED FALSE
@@ -2613,7 +2617,7 @@ const rtems_libio_helper rtems_fs_init_helper =
#endif
} Scheduler;
RTEMS_API_Control API_RTEMS;
- #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
+ #if defined(CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS)
uint32_t Notepads[ RTEMS_NUMBER_NOTEPADS ];
#endif
#ifdef RTEMS_POSIX_API
diff --git a/doc/user/conf.t b/doc/user/conf.t
index dc10816..fe714b4 100644
--- a/doc/user/conf.t
+++ b/doc/user/conf.t
@@ -595,6 +595,40 @@ require the addition of a new configuration parameter to specify the
number of tasks which enable floating point support.
@c
+ at c === CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS ===
+ at c
+ at subsection Enable Classic API Notepads
+
+ at findex CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
+
+ at table @b
+ at item CONSTANT:
+ at code{CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS}
+
+ at item DATA TYPE:
+Boolean feature macro.
+
+ at item RANGE:
+Defined or undefined.
+
+ at item DEFAULT VALUE:
+This is not defined by default, and Classic API Notepads are not supported.
+
+ at end table
+
+ at subheading DESCRIPTION:
+ at code{CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS} should be defined if the
+user wants to have support for Classic API Notepads in their application.
+
+ at subheading NOTES:
+Disabling Classic API Notepads saves the allocation of sixteen (16)
+thirty-two bit integers. This saves sixty-four bytes per task/thread
+plus the allocation overhead. Notepads are rarely used in applications
+and this can save significant memory in a low RAM system. Classic API
+Notepads are deprecated, and this option is expected to be obsolete in
+the near future.
+
+ at c
@c === CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS ===
@c
@subsection Disable Classic API Notepads
@@ -612,20 +646,22 @@ Boolean feature macro.
Defined or undefined.
@item DEFAULT VALUE:
-This is not defined by default, and Classic API Notepads are supported.
+This is not defined by default, and Classic API Notepads are not supported.
@end table
@subheading DESCRIPTION:
- at code{CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS} should be defined if the
-user does not want to have support for Classic API Notepads in their
-application.
+ at code{CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS} is deprecated. If users
+want to have support for Classic API Notepads, they should use
+ at code{CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS}.
@subheading NOTES:
Disabling Classic API Notepads saves the allocation of sixteen (16)
thirty-two bit integers. This saves sixty-four bytes per task/thread
plus the allocation overhead. Notepads are rarely used in applications
-and this can save significant memory in a low RAM system.
+and this can save significant memory in a low RAM system. Classic API
+Notepads are deprecated, and this option is expected to be obsolete in
+the near future.
@c
@c === CONFIGURE_MAXIMUM_TIMERS ===
--
1.9.1
More information about the devel
mailing list