5
Last change
on this file since 74172b7d was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[ac7d5ef0] | 1 | /* void Shm_Cause_interrupt( node ) |
---|
| 2 | * |
---|
| 3 | * This routine is the shared memory driver routine which |
---|
| 4 | * generates interrupts to other CPUs. |
---|
| 5 | * |
---|
| 6 | * It uses the information placed in the node status control |
---|
| 7 | * block by each node. For example, when used with the Motorola |
---|
| 8 | * MVME136 board, the MPCSR is used. |
---|
| 9 | * |
---|
| 10 | * Input parameters: |
---|
| 11 | * node - destination of this packet (0 = broadcast) |
---|
| 12 | * |
---|
| 13 | * Output parameters: NONE |
---|
| 14 | * |
---|
[08311cc3] | 15 | * COPYRIGHT (c) 1989-1999. |
---|
[ac7d5ef0] | 16 | * On-Line Applications Research Corporation (OAR). |
---|
| 17 | * |
---|
[98e4ebf5] | 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 20 | * http://www.rtems.org/license/LICENSE. |
---|
[ac7d5ef0] | 21 | */ |
---|
| 22 | |
---|
| 23 | #include <rtems.h> |
---|
[48bfd992] | 24 | #include "shm_driver.h" |
---|
[ac7d5ef0] | 25 | |
---|
| 26 | void Shm_Cause_interrupt( |
---|
[ee4f57d] | 27 | uint32_t node |
---|
[ac7d5ef0] | 28 | ) |
---|
| 29 | { |
---|
| 30 | Shm_Interrupt_information *intr; |
---|
[ee4f57d] | 31 | uint8_t *u8; |
---|
| 32 | uint16_t *u16; |
---|
| 33 | uint32_t *u32; |
---|
| 34 | uint32_t value; |
---|
[ac7d5ef0] | 35 | |
---|
| 36 | intr = &Shm_Interrupt_table[node]; |
---|
| 37 | value = intr->value; |
---|
| 38 | |
---|
| 39 | switch ( intr->length ) { |
---|
| 40 | case NO_INTERRUPT: |
---|
| 41 | break; |
---|
| 42 | case BYTE: |
---|
[509fec9c] | 43 | u8 = (uint8_t*)intr->address; |
---|
| 44 | *u8 = (uint8_t) value; |
---|
[ac7d5ef0] | 45 | break; |
---|
| 46 | case WORD: |
---|
[509fec9c] | 47 | u16 = (uint16_t*)intr->address; |
---|
| 48 | *u16 = (uint16_t) value; |
---|
[ac7d5ef0] | 49 | break; |
---|
| 50 | case LONG: |
---|
[509fec9c] | 51 | u32 = (uint32_t*)intr->address; |
---|
| 52 | *u32 = (uint32_t) value; |
---|
[ac7d5ef0] | 53 | break; |
---|
| 54 | } |
---|
| 55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.