DOSFS: why do the sources use _core_mutex?

Joel Sherrill joel.sherrill at
Wed May 15 11:44:03 UTC 2002

"Victor V. Vengerov" wrote:
> Hi, Thomas,
> It is quite possible that the attached patch is not applied.
> Hmmm. I couldn't remember, have I sent it to Joel/bugtracker? Joel, could
> you check is it incorporated in latest kernel? (Sorry I'm in a trip
> today...)

This patch looks to be applied although I am just doing it visually.
It is the surrender (and maybe flush) side that looks broken to me.

> You are right, it may be a bad practice to use _CORE_* primitives here.
> But we need to associate semaphore with every buffer. Using API semaphores
> will make RTEMS configuration more complicated (because you have to add
> number of buffers configured in the system to number of configured
> semaphores; you have to take workspace size into account in this
> relations). Also, it will add some memory/performance overhead. We have
> decided, considering this and having in mind that libblock library
> implements code which can be thought as part of RTEMS itself, we are able
> to use internal semaphore representation.

More memory/configuration hassle than anything else.  Performance hit
would be minimal.

It is OK (but not great) as long as you don't block.  If you intend to
then the thing you are blocking on MUST have an ID.  

> Joel, what is your judgement? Is it OK to use _CORE_ semaphores in
> libblock context?

If it is heavily documented and possibly put in libblock wrapper
so we can be sure they honor the semantics. :)

> Thanks,
> Victor
> On Wed, 15 May 2002, Thomas Doerfler wrote:
> > Hi,
> >
> > currently a collegue is busy implementing a IDE block
> > device driver to use with the RTEMS dosfs library.
> > Progress is rather good, but during debugging we
> > detected some problems around the "_CORE_mutex_xxx"
> > calls.
> >
> > I am pretty confident, that these problems have
> > something to do with our debug environment (on a
> > MPC860), but nevertheless I am a bit confused: I
> > thought that these _CORE_mutex" calls are private to
> > the RTEMS kernel. So my question: Is it good practice
> > to use CORE_mutex_xxx calls outside the kernel? Or
> > would it be better to move to semaphores instead?
> >
> > wkr,
> >       Thomas Doerfler.
> > --------------------------------------------
> > IMD Ingenieurbuero fuer Microcomputertechnik
> > Thomas Doerfler           Herbststrasse 8
> > D-82178 Puchheim          Germany
> > email:    Thomas.Doerfler at
> > PGP public key available at: http://www.imd-
> >
> >
>   ------------------------------------------------------------------------
>                                                Name: rtems-ss-20020301-bdbuf-intdisable.patch
>    rtems-ss-20020301-bdbuf-intdisable.patch    Type: Plain Text (TEXT/PLAIN)
>                                            Encoding: BASE64

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

More information about the users mailing list