Multithreaded Programming Guide

mutex_trylock(3THR)

#include <thread.h>

int mutex_trylock(mutex_t *mp);

Use mutex_trylock(3THR) to attempt to lock the mutex pointed to by mp. This function is a nonblocking version of mutex_lock(). (For POSIX threads, see "pthread_mutex_trylock(3THR)".)