[PATCH 18/20] rtems: Remove EVENT_SETS_NONE_PENDING
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Nov 20 13:32:15 UTC 2020
On 20/11/2020 14:30, Joel Sherrill wrote:
>
>
> On Fri, Nov 20, 2020, 5:16 AM Sebastian Huber
> <sebastian.huber at embedded-brains.de
> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>
> This define was only used in one place.
> ---
> cpukit/include/rtems/rtems/eventimpl.h | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/eventimpl.h
> b/cpukit/include/rtems/rtems/eventimpl.h
> index 9ccee0adbd..c65c202de4 100644
> --- a/cpukit/include/rtems/rtems/eventimpl.h
> +++ b/cpukit/include/rtems/rtems/eventimpl.h
> @@ -32,12 +32,6 @@ extern "C" {
> * @{
> */
>
> -/**
> - * The following constant is the value of an event set which
> - * has no events pending.
> - */
> -#define EVENT_SETS_NONE_PENDING 0
> -
> rtems_status_code _Event_Seize(
> rtems_event_set event_in,
> rtems_option option_set,
> @@ -68,7 +62,7 @@ void _Event_Timeout(
>
> RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
> {
> - event->pending_events = EVENT_SETS_NONE_PENDING;
> + event->pending_events = 0;
>
>
> This loses clarity to me. If you want to ditch the constant, you have
> to add a comment.
In patch 20 I added documentation for this function:
+/**
+ * @brief Initializes an event control block to have no pending events.
+ *
+ * @param event is the event control block to initialize.
+ */
RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
{
event->pending_events = 0;
}
--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.
embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list