X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e1213bfe4fb4368952de0f8945fe2b2dc778d346..0a6c8726c3e15e934bf74df09171710e346db558:/teshsuite/xbt/parallel_log_crashtest.c diff --git a/teshsuite/xbt/parallel_log_crashtest.c b/teshsuite/xbt/parallel_log_crashtest.c index 449002732d..4a87e0f55a 100644 --- a/teshsuite/xbt/parallel_log_crashtest.c +++ b/teshsuite/xbt/parallel_log_crashtest.c @@ -1,8 +1,7 @@ -/* $Id: philosopher.c,v 1.7 2007/09/10 15:18:39 mquinson Exp $ */ - /* synchro_crashtest -- tries to crash the logging mecanism by doing // logs*/ -/* Copyright (c) 2007 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,78 +9,69 @@ #include "gras.h" #include "xbt/synchro.h" -XBT_LOG_NEW_DEFAULT_CATEGORY(synchro_crashtest,"Logs of this example"); - +XBT_LOG_NEW_DEFAULT_CATEGORY(synchro_crashtest, "Logs of this example"); -int test_amount = 99; /* Up to 999 to not break the logs (and thus the testing mecanism) */ -int crasher_amount = 99; /* Up to 99 to not break the logs (and thus the testing mecanism) */ -int *id; /* to pass a pointer to the threads without race condition */ +int test_amount = 99; /* Up to 999 to not break the logs (and thus the testing mecanism) */ +int crasher_amount = 99; /* Up to 99 to not break the logs (and thus the testing mecanism) */ +int *id; /* to pass a pointer to the threads without race condition */ -/* - * Some additionnal code to let the father wait the childs - */ -xbt_mutex_t mut_end; -xbt_cond_t cond_end; -int running_threads; - -xbt_mutex_t dead_end; +int more_info = 0; /* SET IT TO TRUE TO GET MORE INFO */ /* Code ran by each thread */ -static void crasher_thread(void *arg) { - int id = *(int*)arg; - int i; - - for (i=0; i