This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 1/2] RTEMS: Adjust layout of struct _Thread_queue_Queue
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: Gedare Bloom <gedare at rtems dot org>, newlib at sourceware dot org, devel at rtems dot org
- Date: Tue, 3 May 2016 14:19:22 -0400 (EDT)
- Subject: Re: [PATCH 1/2] RTEMS: Adjust layout of struct _Thread_queue_Queue
- Authentication-results: sourceware.org; auth=none
- References: <1462193797-16193-1-git-send-email-sebastian dot huber at embedded-brains dot de> <561708283 dot 10514882 dot 1462218935558 dot JavaMail dot zimbra at redhat dot com> <CAC82fA32hvScSR8V1W3xE2edgHyqVUnqySuBgiKOtZSpTykGvA at mail dot gmail dot com> <57283A18 dot 6090407 at embedded-brains dot de>
Patch applied.
-- Jeff J.
----- Original Message -----
> Yes, we already have several changes that require an RTEMS internal
> update, e.g. the recent type definition changes. Now its a good time to
> incorporate such changes, since there will be a major tool update based
> the recently released GCC 6.1.
>
> On 03/05/16 00:43, Gedare Bloom wrote:
> > This should be fine. It's an "internal" API so we just need to ensure
> > consistency in our kernel code.
> >
> > On Mon, May 2, 2016 at 3:55 PM, Jeff Johnston <jjohnstn@redhat.com> wrote:
> >> Do you have consensus with the RTEMS group for this change which breaks
> >> API introduced
> >> last year? Otherwise, I will leave it up to the RTEMS maintainers to
> >> comment.
> >>
> >> -- Jeff J.
> >>
> >> ----- Original Message -----
> >>> Move _Thread_queue_Queue::_Lock to begin of the structure. On RTEMS,
> >>> the presence of a lock component in the thread queue structures actually
> >>> depends on the build-time RTEMS_SMP configuration option. A move of
> >>> this part to the begin of the structure allows an implementation re-use
> >>> for the other parts.
> >>>
> >>> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> >>> ---
> >>> newlib/libc/sys/rtems/include/sys/lock.h | 6 +++---
> >>> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/newlib/libc/sys/rtems/include/sys/lock.h
> >>> b/newlib/libc/sys/rtems/include/sys/lock.h
> >>> index d2a7fb1..002064f 100644
> >>> --- a/newlib/libc/sys/rtems/include/sys/lock.h
> >>> +++ b/newlib/libc/sys/rtems/include/sys/lock.h
> >>> @@ -1,5 +1,5 @@
> >>> /*
> >>> - * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
> >>> + * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
> >>> *
> >>> * Redistribution and use in source and binary forms, with or without
> >>> * modification, are permitted provided that the following conditions
> >>> @@ -43,8 +43,8 @@ struct _Ticket_lock_Control {
> >>> };
> >>>
> >>> struct _Thread_queue_Queue {
> >>> - struct _Thread_queue_Heads *_heads;
> >>> struct _Ticket_lock_Control _Lock;
> >>> + struct _Thread_queue_Heads *_heads;
> >>> };
> >>>
> >>> struct _Mutex_Control {
> >>> @@ -70,7 +70,7 @@ struct _Futex_Control {
> >>> struct _Thread_queue_Queue _Queue;
> >>> };
> >>>
> >>> -#define _THREAD_QUEUE_INITIALIZER { 0, { 0, 0 } }
> >>> +#define _THREAD_QUEUE_INITIALIZER { { 0, 0 }, 0 }
> >>>
> >>> #define _MUTEX_INITIALIZER { _THREAD_QUEUE_INITIALIZER, 0 }
> >>>
> >>> --
> >>> 1.8.4.5
> >>>
> >>>
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber@embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.
>
>