[rtems commit] libblock: Add RTEMS_BDBUF_USE_PTHREAD

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jun 3 06:03:26 UTC 2014


On 2014-06-03 01:58, Chris Johns wrote:
> On 3/06/2014 3:37 am, Gedare Bloom wrote:
>> On Mon, Jun 2, 2014 at 10:48 AM, Sebastian Huber <sebh at rtems.org> wrote:
>>> Module:    rtems
>>> Branch:    master
>>> Commit:    1fc2e960cea37e8d78e142c71faec18262f356d2
>>> Changeset:
>>> http://git.rtems.org/rtems/commit/?id=1fc2e960cea37e8d78e142c71faec18262f356d2
>>>
>>> Author:    Ralf Kirchner <ralf.kirchner at embedded-brains.de>
>>> Date:      Mon Jun  2 14:46:18 2014 +0200
>>>
>>> libblock: Add RTEMS_BDBUF_USE_PTHREAD
>>>
>>> Use the PTHREAD mutexes and condition variables if available.  This
>>> helps on SMP configurations to avoid the home grown condition variables
>>> via disabled preemption.
>>>
>>
>> If the bdbufs work better with this pthread implementation, should we
>> just get rid of the old code in favor of the new code using
>> pthread_mutex and condvar? This would mean requiring users who want
>> bdbufs to also configure for POSIX, which I'm not sure whether that is
>> a problem or not...
>>
>
> I also agree. It seems normal to me to have POSIX enabled to use a POSIX
> compliant file system.

The RTEMS_POSIX_API define is mostly POSIX signals and PTHREAD.  It has 
virtually nothing to do with the file system.

>
> I think we need to understand the benefit and trade off the --enable-posix
> option gives us these days. The fewer options like this we have the better our
> testing results are. There is a limited number of options we can support before
> the ability to test becomes impossible. We have too many to test now.

This patch changes nothing with respect to testability.  It is just one more 
area with an RTEMS_POSIX_API usage.

The general question is if we need --enable-posix at all.  Here we had only 
very small improvements in the last years.  The RTEMS_POSIX_API still pulls in 
a lot of stuff via exinit.c.  I think we need a modular initialization like on 
FreeBSD or Linux to tackle this problem, see also

https://www.rtems.org/bugzilla/show_bug.cgi?id=1593

The new network stack uses this approach also and is very flexible.  The only 
thing necessary is this in our linker command files:

	.rtemsrwset : ALIGN_WITH_INPUT {
		KEEP (*(SORT(.rtemsrwset.*)))
	} > REGION_DATA AT > REGION_DATA_LOAD

	.rtemsroset : ALIGN_WITH_INPUT {
		KEEP (*(SORT(.rtemsroset.*)))
	} > REGION_RODATA AT > REGION_RODATA_LOAD

With this we add new requirements for the linker:

1. We need sections.

2. We need the ability to sort the sections lexicographically by name.

-- 
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 at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list