Semaphores
19-6
ADSP-BF535 Blackfin Processor Hardware Reference
The ADSP-BF535 processor supports nested and non-nested interrupts,
as well as self-nested interrupts. For explanations of the various modes of
servicing events, see
“Interrupts With and Without Nesting” on
page 4-48
.
Semaphores
Semaphores provide a mechanism for communication between multiple
processors or processes/threads running in the same system. They are used
to coordinate resource sharing. For instance, if a process is using a particu-
lar resource and another process requires that same resource, it must wait
until the first process signals that it is no longer using the resource. This
signaling is accomplished via semaphores.
Semaphore coherency is guaranteed by using the Test and Set Byte
(Atomic) instruction (
TESTSET
). The
TESTSET
instruction performs these
functions.
• Loads the byte at memory location pointed to by a P-register.
• Sets
CC
if the value is equal to zero.
• Stores the value back in its original location (but with the most sig-
nificant bit set to 1).
The events triggered by
TESTSET
are atomic operations. The bus for the
memory where the address is located is acquired and not relinquished
until the store operation completes. In multithreaded systems, the
TESTSET
instruction is required to maintain semaphore consistency.
To ensure that the store operation is flushed through any store or write
buffers, issue an
SSYNC
immediately after semaphore release.
Содержание ADSP-BF535 Blackfin
Страница 80: ...Development Tools 1 26 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 312: ...Working With Memory 6 86 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 332: ...System Interfaces 7 20 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 360: ...Dynamic Power Management Controller 8 28 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 446: ...Beginning and Ending an SPI Transfer 10 40 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 522: ...Timing Examples 11 76 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 562: ...IrDA Support 12 40 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 608: ...PCI I O Issues 13 46 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 672: ...References 14 64 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 810: ...SDRAM Controller SDC 18 86 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 811: ...ADSP BF535 Blackfin Processor Hardware Reference 18 87 External Bus Interface Unit...
Страница 812: ...SDRAM Controller SDC 18 88 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 860: ...DMA Bus Debug Registers 20 30 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 908: ...SDRAM Controller External Bus Interface Unit B 36 ADSP BF535 Blackfin Processor Hardware Reference...