[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can malloc() be called from ISR ?
- Date: Thu, 20 Jul 2000 14:41:05 -0400
- From: hsli at utstar.com (HongSong Li)
- Subject: Can malloc() be called from ISR ?
During porting a protocol stack to RTEMS, I found there is a callback function which is used
to handle reveiving HDLC frame from driver layer, it contains malloc() function call internally.
After looking through RTEMS document, I found rtems_region_get_segment() isn't in the list
of directives allowed from ISR. So I wonder whether this callback function can be called
directly in driver's ISR or the driver create a receive daemon task and invoke this callback
function in the task(this is more time consuming).
Furthermore, can anybody explains the protection mechanisms used by RTEMS supercore
to implement mutual exclusion with minimum interrupt latency, both among tasks and ISR.
I can't find any document about this. Before hacking source code, I want a brief introduciton.
Any help is appreciated !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rtems.rtems.org/pipermail/rtems-users/attachments/20000720/8f348a5d/attachment.html