thread_exit (9)
Leading comments
Copyright (c) 2002 Julian Elischer All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or o...
NAME
thread_exit - abandon current thread contextSYNOPSIS
In sys/param.h In sys/proc.h Ft void Fn thread_exit voidDESCRIPTION
The Fn thread_exit function implements the machine independent prelude to a thread shutdown. It will not return, and will result in a call to mi_switch9 to schedule some other thread.Fn thread_exit arranges to free all the resources of the thread, specifically the kernel stack.
To protect the runqueue(9), Fn thread_exit must be called with the sched_lock mutex held.