A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'smpi'
[simgrid.git]
/
src
/
gras
/
gras.c
diff --git
a/src/gras/gras.c
b/src/gras/gras.c
index
dedb373
..
c810ef1
100644
(file)
--- a/
src/gras/gras.c
+++ b/
src/gras/gras.c
@@
-29,7
+29,7
@@
static int gras_running_process = 0;
#if defined(HAVE_SIGNAL) && defined(HAVE_SIGNAL_H)
static void gras_sigusr_handler(int sig)
{
#if defined(HAVE_SIGNAL) && defined(HAVE_SIGNAL_H)
static void gras_sigusr_handler(int sig)
{
-
INFO0
("SIGUSR1 received. Display the backtrace");
+
XBT_INFO
("SIGUSR1 received. Display the backtrace");
xbt_backtrace_display_current();
}
xbt_backtrace_display_current();
}
@@
-68,12
+68,16
@@
XBT_LOG_EXTERNAL_CATEGORY(gras_virtu);
XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_emul);
XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_process);
XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_emul);
XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_process);
+/**
+ * @ingroup GRAS_API
+ * \brief Initialize the gras mechanisms.
+ */
void gras_init(int *argc, char **argv)
{
int first = 0;
gras_procdata_t *pd;
gras_msg_procdata_t msg_pd;
void gras_init(int *argc, char **argv)
{
int first = 0;
gras_procdata_t *pd;
gras_msg_procdata_t msg_pd;
-
VERB0
("Initialize GRAS");
+
XBT_VERB
("Initialize GRAS");
xbt_getpid = gras_os_getpid;
/* First initialize the XBT */
xbt_getpid = gras_os_getpid;
/* First initialize the XBT */
@@
-143,13
+147,15
@@
void gras_init(int *argc, char **argv)
pd->listener = gras_msg_listener_launch(msg_pd->msg_received);
}
pd->listener = gras_msg_listener_launch(msg_pd->msg_received);
}
+/**
+ * @ingroup GRAS_API
+ * @brief Finalize the gras mechanisms.
+ * */
void gras_exit(void)
{
void gras_exit(void)
{
- gras_procdata_t *pd;
- INFO0("Exiting GRAS");
+ XBT_INFO("Exiting GRAS");
amok_exit();
gras_moddata_leave();
amok_exit();
gras_moddata_leave();
- pd = gras_procdata_get();
gras_msg_listener_shutdown();
gras_process_exit();
if (--gras_running_process == 0) {
gras_msg_listener_shutdown();
gras_process_exit();
if (--gras_running_process == 0) {
@@
-169,8
+175,7
@@
const char *hexa_str(unsigned char *data, int size, int downside)
int begin, increment;
if (buffsize < 5 * (size + 1)) {
int begin, increment;
if (buffsize < 5 * (size + 1)) {
- if (buff)
- free(buff);
+ free(buff);
buffsize = 5 * (size + 1);
buff = xbt_malloc(buffsize);
}
buffsize = 5 * (size + 1);
buff = xbt_malloc(buffsize);
}