Altera_avalon_mutex_first_lock(), Altera_avalon_mutex_lock(), Altera_avalon_mutex_open() – Altera Embedded Peripherals IP User Manual

Page 261: Altera_avalon_mutex_first_lock() -4, Altera_avalon_mutex_lock() -4, Altera_avalon_mutex_open() -4

Advertising
background image

altera_avalon_mutex_first_lock()

Prototype:

int altera_avalon_mutex_first_lock(alt_mutex_dev* dev)

Thread-safe:

Yes.

Available from

ISR:

No.

Include:

<

altera_avalon_mutex.h

>

Parameters:

dev

—the mutex device to test.

Returns:

Returns 1 if this mutex has not been released since reset, otherwise returns 0.

Description:

altera_avalon_mutex_first_lock()

determines whether this mutex has

been released since reset.

altera_avalon_mutex_lock()

Prototype:

void altera_avalon_mutex_lock(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 acquire.

value

—the new value to write to the mutex.

Returns:

Description:

altera_avalon_mutex_lock()

is a blocking routine that acquires a hardware

mutex, and at the same time, loads the mutex with the

value

parameter.

altera_avalon_mutex_open()

Prototype:

alt_mutex_dev* alt_hardware_mutex_open(const char* name)

Thread-safe:

Yes.

Available from

ISR:

No.

Include:

<

altera_avalon_mutex.h

>

Parameters:

name

—the name of the mutex device to open.

Returns:

A pointer to the mutex device structure associated with the supplied name, or

NULL if no corresponding mutex device structure was found.

Description:

altera_avalon_mutex_open()

retrieves a pointer to a hardware mutex device

structure.

26-4

altera_avalon_mutex_first_lock()

UG-01085

2014.24.07

Altera Corporation

Mutex Core

Send Feedback

Advertising