Angus
Angus

Reputation: 12631

functionality of local_fiq_enable()

Came across the function local_fiq_enable()

 #define local_fiq_enable()  __asm__("cpsie f    @ __stf" : : : "memory", "cc")

Couldn't understand what the __asm__("cpsie f @ __stf" : : : "memory", "cc") does.

All I could understand is enables [1st parameter - cpie] something

Upvotes: 0

Views: 119

Answers (1)

Marcus Müller
Marcus Müller

Reputation: 36462

__asm__("cpsie f    @ __stf" : : : "memory", "cc")

is inline assembler.

You didn't specify your architecture (that would be really helpful here, because assembler is different for every CPU instruction set), but this looks ARM-sy:

If that's the case, this enables interrupts. What it really does depends on your device -- not only the ARM generation, but your actual piece of silicon. This happens on the interface between the ARM IP core and the "outer world".

Upvotes: 1

Related Questions