[PATCH] OsdSynch.c modernization

Jung-uk Kim jkim at FreeBSD.org
Tue Sep 25 12:38:38 PDT 2007


On Monday 24 September 2007 01:03 pm, Nate Lawson wrote:
> Jung-uk Kim wrote:
> > (At least on my laptop) I found the malloc() was called from our
> > code, i.e., AcpiOsExecute() from OsdSched.c.  I'll try something
> > shortly cause I was going to rewrite the file anyway.
>
> Yep, that's because we need a task structure that's different for
> each call and acpi-ca doesn't like the "pending" argument (see
> OsdSchedule.c).  One fix for this is to just use a hack and cast
> the fn to discard the extra arg.  Not sure this would work.

I quickly tested it but didn't work. :-(

Actually it is not just pending argument but struct task itself has to 
be allocated.  I did crude hack to see if it is possible to have it 
working with spin mutex gracefully.  It can be done if we 
pre-allocate some space for the tasks and use fast taskqueue.  Does 
it make sense to you?

Thanks,

Jung-uk Kim


More information about the freebsd-acpi mailing list