#include <thread.h> int mutex_trylock(mutex_t *mp);
Use mutex_trylock() to attempt to lock the mutex pointed to by mp. This function is a nonblocking version of mutex_lock().