This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Does ethernet driver "deliver" method need to be re-entrant?


Grant Edwards wrote:
On 2007-04-01, Grant Edwards <grante@visi.com> wrote:

I'm having intermittent problems with an Ethernet driver.  One
possible explanation would be if the driver's "deliver" method
was being called "simultaneously" from two different contexts.

Can this happen, or are calls to deliver guaranteed to be
serialized?

The problem caused by a race condition in a different section of the driver. I'm not sure why the author of the driver didn't put in mutexes. The sample driver we gave him to follow had them.

Anywy, I still need to know if deliver needs to be re-entrant
or not.  It looks to me like not -- it is called only from a
DSR context by an alarm handler in the stack, right?

It would be nice if the driver API documentation state whether
each driver method needed to be re-entrant or not...


There is no expectation for any of the ethernet driver functions to be reentrant. Serialization is handled by the other layers that call these functions.


-- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]