From 32ac8281ce318a1741a7577cc0e81be1da9d3f95 Mon Sep 17 00:00:00 2001 From: Nikhil Samith Bysani Date: Mon, 12 Jan 2009 13:46:21 -0500 Subject: [PATCH] Small changes in documentation. --- src/base/bang-module.c | 3 +++ src/base/bang-signals.c | 28 ++++++++++++++-------------- src/modules/matrix-mult-module.c | 1 - 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/base/bang-module.c b/src/base/bang-module.c index cbd60ce..f0cc73f 100644 --- a/src/base/bang-module.c +++ b/src/base/bang-module.c @@ -25,6 +25,9 @@ * -BANG_module_version: version of the module * -BANG_module_init: initialize the module * -BANG_module_run: runs the module + * + * How should the GUI interact with the module? Using their owns symbols in the module + * such as "GUI_init". */ #define BDEBUG_1 diff --git a/src/base/bang-signals.c b/src/base/bang-signals.c index aea1599..b8a8e1a 100644 --- a/src/base/bang-signals.c +++ b/src/base/bang-signals.c @@ -22,6 +22,20 @@ struct _signal_node { typedef struct _signal_node signal_node; +/** + * Another read-writer problem, multiple threads can send out the same signal at the same time, but only one thread + * should be allowed add a signal handler. + */ +static pthread_mutex_t send_sig_lock[BANG_NUM_SIGS]; +static pthread_mutex_t add_handler_lock[BANG_NUM_SIGS]; +static int sig_senders[BANG_NUM_SIGS]; + +/** + * \brief The handlers for each of the signals is kept in a linked list stored + * in an array which is index by the signal's number + */ +static signal_node **signal_handlers; + /** * \param head The head of the signal_node list. * @@ -36,20 +50,6 @@ static void recursive_sig_free(signal_node *head) { head = NULL; } -/** - * \brief The handlers for each of the signals is kept in a linked list stored - * in an array which is index by the signal's number - */ -static signal_node **signal_handlers; - -/** - * Another read-writer problem, multiple threads can send out the same signal at the same time, but only one thread - * should be allowed add a signal handler. - */ -static pthread_mutex_t send_sig_lock[BANG_NUM_SIGS]; -static pthread_mutex_t add_handler_lock[BANG_NUM_SIGS]; -static int sig_senders[BANG_NUM_SIGS]; - static void acquire_sig_lock(int signal) { pthread_mutex_lock(&send_sig_lock[signal]); if (sig_senders[signal] == 0) diff --git a/src/modules/matrix-mult-module.c b/src/modules/matrix-mult-module.c index d316e66..304d1f5 100644 --- a/src/modules/matrix-mult-module.c +++ b/src/modules/matrix-mult-module.c @@ -101,7 +101,6 @@ void BANG_module_run() { /* This should not change, however ids are only avialable when the program is run. */ id = api.BANG_get_my_id(); - gtk_widget_show(window); gtk_widget_show(label); }