Skip to content

Commit

Permalink
Small changes in documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Samith Bysani committed Jan 12, 2009
1 parent 707f6cf commit 32ac828
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/base/bang-module.c
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions src/base/bang-signals.c
Expand Up @@ -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.
*
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/modules/matrix-mult-module.c
Expand Up @@ -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);
}

0 comments on commit 32ac828

Please sign in to comment.