GNU Radio 3.3.0 C++ API
write_trylock.h File Reference
#include "sync_utils.h"
#include "mutex.h"
Include dependency graph for write_trylock.h:

Go to the source code of this file.

Functions

static __inline int _write_trylock (eaddr_t ea)

Function Documentation

static __inline int _write_trylock ( eaddr_t  ea) [static]

write_trylock - acquire a writer lock, or return immediately. : handle to effective address of lock variable.

Try to acquire an exclusive writer lock, or return immediately. The only restriction here is that must be word aligned.

Returns 1 on success, or 0 on failure.

Caution: The application should not call this interface from a tight loop!! Use write_lock() instead.

References DECL_MUTEX_VARS, and RAW_TEST_AND_SET.