From f5674938bb6008a62223a71c97a4c7ce4c660ddc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 22 Apr 1996 16:49:25 +0000 Subject: Fixed so now supports more than 16 nodes. Tested for up to 24 nodes by Tony Bennett. Information table is now malloc'ed. --- c/src/libchip/shmdr/init.c | 9 +++++++++ c/src/libchip/shmdr/shm_driver.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'c/src/libchip') diff --git a/c/src/libchip/shmdr/init.c b/c/src/libchip/shmdr/init.c index 8b62d6fb46..a553e4ff9b 100644 --- a/c/src/libchip/shmdr/init.c +++ b/c/src/libchip/shmdr/init.c @@ -24,6 +24,8 @@ #include #include /* memset() */ +#include /* malloc() */ +#include /* * User extension to install MPCI_Fatal as a fatal error @@ -53,6 +55,13 @@ rtems_mpci_entry Shm_Initialization( void ) Shm_Get_configuration( Shm_Local_node, &Shm_Configuration ); + Shm_Interrupt_table = (Shm_Interrupt_information *) malloc( + sizeof(Shm_Interrupt_information) * (Shm_Maximum_nodes + 1) + ); + + assert( Shm_Interrupt_table ); + + Shm_Receive_message_count = 0; Shm_Null_message_count = 0; Shm_Interrupt_count = 0; diff --git a/c/src/libchip/shmdr/shm_driver.h b/c/src/libchip/shmdr/shm_driver.h index 2b0e39320d..e7a8ae0496 100644 --- a/c/src/libchip/shmdr/shm_driver.h +++ b/c/src/libchip/shmdr/shm_driver.h @@ -430,7 +430,7 @@ typedef struct shm_config_info shm_config_table; #endif SHM_EXTERN shm_config_table *Shm_Configuration; -SHM_EXTERN Shm_Interrupt_information Shm_Interrupt_table[16]; +SHM_EXTERN Shm_Interrupt_information *Shm_Interrupt_table; SHM_EXTERN Shm_Node_status_control *Shm_Node_statuses; SHM_EXTERN Shm_Locked_queue_Control *Shm_Locked_queues; SHM_EXTERN Shm_Envelope_control *Shm_Envelopes; -- cgit v1.2.3