On 11/15/2013 07:59 PM, Matt Thomas wrote: > > On Nov 15, 2013, at 10:56 AM, Lars Heidieker <l...@heidieker.de> wrote: > >> Matt, you mean allocating and freeing memory from softint context should >> be ok? That's something that went through my mind as well and I think >> it's the right way. > > I do. softint routines can wait for mutexes so allocation in them should > be safe. Adding the complexity of needing a "real" thread context to do > safe allocations seems more prone to problems. >
a few month ago I looked at some allocations in oder to change them to thread context and a lot of them are like allocating from thread context and freeing from softint context. eg wapbl_entry_pool in wapbl_entry_pool and those pools used for USB ehcixfer uhcixfer etc fall into the same category if I remember right. I came to the same conclusion that a lot complexity and a lot of custom code for these allocation would be required to move them to thread context and installing a special pool for each allocation is a lot of overhead as well and doesn't fill the bill. Lars