1 /* Copyright (c) 2011. The SimGrid Team.
2 * All rights reserved. */
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. */
10 static xbt_dynar_t registered_static_stack = NULL;
12 void smpi_register_static(void* arg)
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);
19 void smpi_free_static(void)
21 while (!xbt_dynar_is_empty(registered_static_stack)) {
22 void *p = xbt_dynar_pop_as(registered_static_stack, void*);
25 xbt_dynar_free(®istered_static_stack);