Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: panic in thread_invoke



Yes, you're right.

I'm holding a simple lock within the wrapper for
kernel_thread.

Thanks for your help Jim and Brian.

Regards,
Herry

> -----Original Message-----
> From: Jim Magee [mailto:email@hidden]
> Sent: Saturday, June 21, 2003 07:57
> To: Herry Wiputra
> Cc: email@hidden
> Subject: Re: panic in thread_invoke
>
>
>
> On Friday, June 20, 2003, at 12:04 AM, Herry Wiputra wrote:
> > I am having a problem with my kext keep panicing in
> thread_invoke().
> >
> > The exact error message is
> > panic: thread_invoke: preemption_level 1
>
> You are either sleeping with preemption disabled explicitly, or
> implicitly (by holding a real simple lock when you sleep).
>
> > In my code, I have a function which already hold a network funnel,
> > then enter this while loop in which it will sleep until an event
> > happen and spawn a new thread to handle some computation.
> >
> > The new thread will also try to grab the network_funnel and will
> > release it when it returns.
> >
> > My kext kept panicing on the second loop, after it spawns
> a new thread
> > and sleep again waiting for an event to happen.
> >
> > Does anyone ever comes across this issue before??
>
> I'd have to see the exact code to provide any more feedback
> than above.
> But look for a simple lock that you forget to unlock
> before sleeping.
>
> --Jim
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: panic in thread_invoke (From: Jim Magee <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.