Semaphore - Task priority queueing not working (Binkowski, Cassio)

Joel Sherrill joel.sherrill at OARcorp.com
Tue Jul 24 22:48:58 UTC 2012


On 07/24/2012 04:46 PM, Matias Pinedo wrote:
> Hello Cassio,
>
> It seems that you have created the semaphore as GLOBAL, and the RTEMS 
> documentation says:
> /The priority inheritance and priority ceiling algorithms are only 
> supported for local, binary/
> /semaphores that use the priority task wait queue blocking discipline./
>
That would definitely apply if he had configured with 
--enable-multiprocessing. But he
would have gotten an error on the rtems_semaphore_create() call.

The GLOBAL flag is ignored when multiprocessing is disabled. See 
cpukit/rtems/src/semcreate.c

--joel
> Cheers,
>
> Matías
>
> On Tue, Jul 24, 2012 at 2:00 PM, <rtems-users-request at rtems.org 
> <mailto:rtems-users-request at rtems.org>> wrote:
>
>     Send rtems-users mailing list submissions to
>     rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>
>     To subscribe or unsubscribe via the World Wide Web, visit
>     http://www.rtems.org/mailman/listinfo/rtems-users
>     or, via email, send a message with subject or body 'help' to
>     rtems-users-request at rtems.org <mailto:rtems-users-request at rtems.org>
>
>     You can reach the person managing the list at
>     rtems-users-owner at rtems.org <mailto:rtems-users-owner at rtems.org>
>
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of rtems-users digest..."
>
>
>     Today's Topics:
>
>        1. Semaphore - Task priority queueing not working (Binkowski,
>     Cassio)
>        2. Re: Power management (Sebastian Huber)
>        3. Can rtems4.11-gcc compile rtems-4.10? (??)
>        4. Re: Can rtems4.11-gcc compile rtems-4.10? (Pierre Ficheux)
>        5. Re: Can rtems4.11-gcc compile rtems-4.10? (Ralf Corsepius)
>        6. Re: Can rtems4.11-gcc compile rtems-4.10? (Ralf Corsepius)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Mon, 23 Jul 2012 23:57:31 -0300
>     From: "Binkowski, Cassio" <cassioiks at gmail.com
>     <mailto:cassioiks at gmail.com>>
>     To: rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     Subject: Semaphore - Task priority queueing not working
>     Message-ID:
>     <CAG93Rg4FJdoh_NdRGnRJvwJJyvd7jnYJUXoqw9fCDGpMTb=ppA at mail.gmail.com <mailto:ppA at mail.gmail.com>>
>     Content-Type: text/plain; charset="iso-8859-1"
>
>     Hello
>
>     I am creating a Semaphore where Tasks are queued by priority, and
>     yet a
>     Task with lower priority stands in front of a higher priority task.
>
>     Here are the steps I'm following:
>
>     1) Create a Semaphore;
>     2) Task 1, with priority 1, obtains the Semaphore;
>     3) Task 2, with priority 3, tries to obtain the Semaphore with
>     "wait for
>     ever condition";
>     4) Task 3, with priority 2, tries to obtain the Semaphore with
>     "wait for
>     ever condition";
>     5) Task 1 releases the Semaphore;
>     6) Task 2 obtains the Semaphore. *---> This is where Task 3 should
>     obtains
>     the **Semaphore, because of the Priority.*
>
>     This is how I'm creating the Semaphore:
>
>     status = rtems_semaphore_create(
>     rtems_build_name('S','M','P','R'),
>      1,
>     RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_GLOBAL,
>     0,
>     &semaphoreId
>     );
>
>
>     What am I doing wrong?
>
>     Best regards
>     Cassio
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     <http://www.rtems.org/pipermail/rtems-users/attachments/20120723/4aaa79b4/attachment-0001.html>
>
>     ------------------------------
>
>     Message: 2
>     Date: Tue, 24 Jul 2012 09:52:29 +0200
>     From: Sebastian Huber <sebastian.huber at embedded-brains.de
>     <mailto:sebastian.huber at embedded-brains.de>>
>     To: RTEMS <rtems-users at rtems.org <mailto:rtems-users at rtems.org>>
>     Subject: Re: Power management
>     Message-ID: <500E543D.1020409 at embedded-brains.de
>     <mailto:500E543D.1020409 at embedded-brains.de>>
>     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>     Hello,
>
>     everything that the RTEMS core system offers in terms of power
>     management is an
>     application specific idle task.  For good power management you
>     need a device
>     driver model which supports suspend and resume operations.   The
>     standard RTEMS
>     device drivers have no such capability.  Thus power management is
>     up to the
>     application in the RTEMS world.  It is possible to use the FreeBSD
>     driver model
>     on RTEMS for example which has support for suspend and resume
>     operations, but
>     every driver of your hardware has to be written with power
>     management in mind.
>
>     --
>     Sebastian Huber, embedded brains GmbH
>
>     Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
>     Phone   : +49 89 18 90 80 79-6
>     Fax     : +49 89 18 90 80 79-9
>     E-Mail  : sebastian.huber at embedded-brains.de
>     <mailto:sebastian.huber at embedded-brains.de>
>     PGP     : Public key available on request.
>
>     Diese Nachricht ist keine gesch?ftliche Mitteilung im Sinne des EHUG.
>
>
>
>
>     ------------------------------
>
>     Message: 3
>     Date: Wed, 25 Jul 2012 00:08:01 +0800
>     From: ?? <shurphey at gmail.com <mailto:shurphey at gmail.com>>
>     To: rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     Subject: Can rtems4.11-gcc compile rtems-4.10?
>     Message-ID: <500EC861.3010809 at gmail.com
>     <mailto:500EC861.3010809 at gmail.com>>
>     Content-Type: text/plain; charset=GB2312
>
>     Hi all,
>     Someone can tell me how to use rtems4.11-gcc to compile
>     rtems-4.10? Now,
>     i have rtems4.11 toolchains and rtems4.10 source code,
>     i want to use the toolchain to compile the code, i configured the
>     target=xxxx-rtems4.11, but fail. Thanks!
>
>
>     ------------------------------
>
>     Message: 4
>     Date: Tue, 24 Jul 2012 18:21:56 +0200
>     From: Pierre Ficheux <pierre.ficheux at openwide.fr
>     <mailto:pierre.ficheux at openwide.fr>>
>     To: rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     Subject: Re: Can rtems4.11-gcc compile rtems-4.10?
>     Message-ID: <500ECBA4.5040903 at openwide.fr
>     <mailto:500ECBA4.5040903 at openwide.fr>>
>     Content-Type: text/plain; charset=UTF-8; format=flowed
>
>     Le 24/07/2012 18:08, ?? a ?crit :
>     > Hi all,
>     > Someone can tell me how to use rtems4.11-gcc to compile
>     rtems-4.10? Now,
>     > i have rtems4.11 toolchains and rtems4.10 source code,
>     > i want to use the toolchain to compile the code, i configured the
>     > target=xxxx-rtems4.11, but fail. Thanks!
>     >
>
>     What's the use of it? It's not so difficult/long to build a 4.10
>     compiler.
>
>     http://www.rtems.org/wiki/index.php/Building_Tools
>
>     regards
>
>     --
>     Pierre FICHEUX  -/- CTO OWI, France -\- pierre.ficheux at openwide.fr
>     <mailto:pierre.ficheux at openwide.fr>
>     http://ingenierie.openwide.fr
>     http://www.ficheux.org
>     I would love to change the world, but they won't give me the
>     source code
>
>
>
>
>     ------------------------------
>
>     Message: 5
>     Date: Tue, 24 Jul 2012 18:38:22 +0200
>     From: Ralf Corsepius <ralf.corsepius at rtems.org
>     <mailto:ralf.corsepius at rtems.org>>
>     To: rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     Subject: Re: Can rtems4.11-gcc compile rtems-4.10?
>     Message-ID: <500ECF7E.4020308 at rtems.org
>     <mailto:500ECF7E.4020308 at rtems.org>>
>     Content-Type: text/plain; charset=UTF-8; format=flowed
>
>     On 07/24/2012 06:08 PM, ?? wrote:
>     > Hi all,
>     > Someone can tell me how to use rtems4.11-gcc to compile rtems-4.10?
>     You can't.
>
>       Both are different generations of toolchains with different
>     setups and
>     different features.
>
>     Ralf
>
>
>
>     ------------------------------
>
>     Message: 6
>     Date: Tue, 24 Jul 2012 18:44:28 +0200
>     From: Ralf Corsepius <ralf.corsepius at rtems.org
>     <mailto:ralf.corsepius at rtems.org>>
>     To: rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     Subject: Re: Can rtems4.11-gcc compile rtems-4.10?
>     Message-ID: <500ED0EC.8040901 at rtems.org
>     <mailto:500ED0EC.8040901 at rtems.org>>
>     Content-Type: text/plain; charset=UTF-8; format=flowed
>
>     On 07/24/2012 06:21 PM, Pierre Ficheux wrote:
>     > Le 24/07/2012 18:08, ?? a ?crit :
>     >> Hi all,
>     >> Someone can tell me how to use rtems4.11-gcc to compile
>     rtems-4.10? Now,
>     >> i have rtems4.11 toolchains and rtems4.10 source code,
>     >> i want to use the toolchain to compile the code, i configured the
>     >> target=xxxx-rtems4.11, but fail. Thanks!
>     >>
>     >
>     > What's the use of it? It's not so difficult/long to build a 4.10
>     compiler.
>     >
>     > http://www.rtems.org/wiki/index.php/Building_Tools
>
>     This is just a rough and coarse outline, describing the basic working
>     principle, it lacks many details and doesn't reflect the fact building
>     the toolchains is a rolling and evolving process. I can't recommend
>     anybody (esp. new-comers) following it.
>
>     That said, if not very being careful, it's pretty much guaranteed to
>     kill an installation. It's one of the reasons why I am supplying
>     binary
>     packages and why OpenSource OS vendors are supplyling binary
>     packages ;)
>
>     Ralf
>
>
>
>     ------------------------------
>
>     _______________________________________________
>     rtems-users mailing list
>     rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     http://www.rtems.org/mailman/listinfo/rtems-users
>
>
>     End of rtems-users Digest, Vol 70, Issue 29
>     *******************************************
>
>


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120724/fcc2ac7f/attachment-0001.html>


More information about the users mailing list