tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to prevent a mutex being _enter()ed from being _destroy()ed?



> More likely is that the socket is prematurely freed before unp_gc 
> grabs it at all.
But then the mutex_oncpu() in the if above the do...while would panic, no?

> You could do something like create a global variable that stores the
> socket pointer that unp_gc is currently working on, shortly before it
> tries solock, and kassert that soclose isn't given that.
I thought about something like that but thought that was too simplistic.
How do I synchronize the variable value amongst threads?


Home | Main Index | Thread Index | Old Index