redheart wrote:
I firstly called cyg_mbox_get in DSR, and block certain thread
then i called cyg_mbox_put in another thread,
then the scheduler attempt to wake up the blocked thread
but at the time of switching context, the system corrupt.

the debugger show that "previus frame inner to this frame (corrupt stack?)" I know that call blockable function in a DSR is illegal.
but i don'r know what resulted in the corrupt.

why?


Because this is an unsafe operation and "not allowed" to
be called from a DSR.  DSRs cannot call any kernel function
which might block (because they are run anonymously, not in
any particular thread context).

--
------------------------------------------------------------
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

Reply via email to