DOSFS: why do the sources use _core_mutex?
Joel Sherrill
joel.sherrill at OARcorp.com
Wed May 15 11:35:25 UTC 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.
These calls need to be changed to use the semaphore
manager. There are certain environmental constraints
that have to be honored when using the core operations
and I can't easily see that they are being honored.
The use of Seize looks ok at 1st glance but the use
of surrender appears to be wrong since it isn't disabling
dispatching around it like the semrelease.c code does.
It is much easier to use the proper API.
While you are at it, I would delete the "!defined(SAFE)"
version of preemption management.
> 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?
It is not good practice to use core services outside
the kernel. It would be better to use a real semaphore.
> wkr,
> Thomas Doerfler.
> --------------------------------------------
> IMD Ingenieurbuero fuer Microcomputertechnik
> Thomas Doerfler Herbststrasse 8
> D-82178 Puchheim Germany
> email: Thomas.Doerfler at imd-systems.de
> PGP public key available at: http://www.imd-
> systems.de/pgp_key.htm
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com 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