Re: CE6 porting a CE5 BSP - SC_CreateMutex
- From: "Steve Maillet \(eMVP\)" <nospam1@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Dec 2006 14:35:11 -0500
Correct me if I am wrong but I thought critical section objects willNope, the OAL code is in the kernel process so you can use a critical
only work for different threads in one process.
If I want to access the resource (the i2c device) from a driver and the
OAL surely these will be running in processes?
section in the OAL just fine. You don't need a Mutex in the OAL. The biggest
reason people tried using them before, other than misunderstanding it wasn't
needed, was to have the OAL and a FULL driver access the same physical
device (often i2c controllers) directly. Thus they synchronized the access
via a mutex and nothing else in common. The thinking generally goes that
it's more "efficient" to do it that way since you aren't calling into the
OAL from your driver to do anything with the bus. Trouble is, that's not
really valid, as the Mutex synch calls cause a transition into the kernel,
just like calling the OAL so in the end there is, at best, no difference and
at worst worse performance because you may acquire and release the mutex
multiple times in the process of moving data out. Putting all the bus code
into the OAL you actually only get the hit once.
--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com
.
- References:
- CE6 porting a CE5 BSP - SC_CreateMutex
- From: AJM42
- Re: CE6 porting a CE5 BSP - SC_CreateMutex
- From: Steve Maillet \(eMVP\)
- Re: CE6 porting a CE5 BSP - SC_CreateMutex
- From: AJM42
- CE6 porting a CE5 BSP - SC_CreateMutex
- Prev by Date: Re: how to load in a build in driver whose index is greater 10 in Windows CE
- Next by Date: Re: Can anybody able to do the CETK tests after installing the IMX31 BSP
- Previous by thread: Re: CE6 porting a CE5 BSP - SC_CreateMutex
- Next by thread: (CE6) How to debug app for my own SDK?
- Index(es):
Relevant Pages
|
|