Lack of usable thread_exit(9) api painful.

Alfred Perlstein alfred at
Mon Oct 22 11:59:43 PDT 2007

Hey guys,

I'm trying to develop a feature here and I'm getting hit pretty
hard by not having a very useable API for doing things when a thread
is torn down.

I basically need to do a vsunlock(9) on some of the process's memory,
however doing that is proving difficult as thread_exit(9) requires
sched and proc locks going in which appear to need to be held throughout
the function in order to function properly.

Does anyone have any ideas?

I'm probably going to hook into the reaper thread that kills thread
contexts, and hopefully that should be enough to get it right, but
I'm not 100% sure.


- Alfred Perlstein

More information about the freebsd-threads mailing list