beautypg.com

Altera_avalon_mutex_trylock(), Altera_avalon_mutex_unlock(), Document revision history – Altera Embedded Peripherals IP User Manual

Page 262: Altera_avalon_mutex_trylock() -5, Altera_avalon_mutex_unlock() -5, Document revision history -5

background image

altera_avalon_mutex_trylock()

Prototype:

int altera_avalon_mutex_trylock(alt_mutex_dev* dev, alt_u32

value

)

Thread-safe:

Yes.

Available from

ISR:

No.

Include:

<

altera_avalon_mutex.h

>

Parameters:

dev

—the mutex device to lock.

value

—the new value to write to the mutex.

Returns:

0

= The mutex was successfully locked.

Others = The mutex was not locked.

Description:

altera_avalon_mutex_trylock()

tries once to lock the hardware mutex, and

returns immediately.

altera_avalon_mutex_unlock()

Prototype:

void altera_avalon_mutex_unlock(alt_mutex_dev* dev)

Thread-safe:

Yes.

Available from

ISR:

No.

Include:

<altera_avalon_mutex.h>

Parameters:

dev

—the mutex device to unlock.

Returns:

Null.

Description:

altera_avalon_mutex_unlock()

releases a hardware mutex device. Upon

release, the value stored in the mutex is set to zero. If the caller does not hold

the mutex, the behavior of this function is undefined.

Document Revision History

Table 26-3: Document Revision History

Date and

Document

Version

Changes Made

Summary of Changes

July 2014
v14.0.0

-Removed mention of SOPC Builder, updated to Qsys Maintenance Release

UG-01085

2014.24.07

altera_avalon_mutex_trylock()

26-5

Mutex Core

Altera Corporation

Send Feedback