Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
be case insensitive when trying to change main name in F90 files
[simgrid.git] / src / smpi / smpi_c99.c
1 /* Copyright (c) 2011. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5   * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include <xbt/dynar.h>
8 #include "private.h"
9
10 static xbt_dynar_t registered_static_stack = NULL;
11
12 void smpi_register_static(void* arg)
13 {
14   if (!registered_static_stack)
15     registered_static_stack = xbt_dynar_new(sizeof(void*), NULL);
16   xbt_dynar_push_as(registered_static_stack, void*, arg);
17 }
18
19 void smpi_free_static(void)
20 {
21   while (!xbt_dynar_is_empty(registered_static_stack)) {
22     void *p = xbt_dynar_pop_as(registered_static_stack, void*);
23     free(p);
24   }
25   xbt_dynar_free(&registered_static_stack);
26 }