From d47c480e46b9a7318dfaa50398a83db04171f83e Mon Sep 17 00:00:00 2001 From: Brian Demsky Date: Fri, 6 Dec 2019 14:33:40 -0800 Subject: [PATCH] remove option --- main.cc | 14 +++----------- params.h | 1 - threads.cc | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/main.cc b/main.cc index 5bee8ce6..ea97d32a 100644 --- a/main.cc +++ b/main.cc @@ -23,7 +23,6 @@ void param_defaults(struct model_params *params) params->uninitvalue = 0; params->maxexecutions = 10; params->nofork = false; - params->threadsnocleanup = false; } static void print_usage(struct model_params *params) @@ -37,7 +36,7 @@ static void print_usage(struct model_params *params) "Distributed under the GPLv2\n" "Written by Brian Norris and Brian Demsky\n" "\n" - "Usage: [MODEL-CHECKER OPTIONS] -- [PROGRAM ARGS]\n" + "Usage: C11TESTER=[MODEL-CHECKER OPTIONS]\n" "\n" "MODEL-CHECKER OPTIONS can be any of the model-checker options listed below. Arguments\n" "provided after the `--' (the PROGRAM ARGS) are passed to the user program.\n" @@ -56,11 +55,7 @@ static void print_usage(struct model_params *params) "-x, --maxexec=NUM Maximum number of executions.\n" " Default: %u\n" " -o help for a list of options\n" - "-n No fork\n" -#ifdef TLS - "-d Don't allow threads to cleanup\n" -#endif - " -- Program arguments follow.\n\n", + "-n No fork\n\n" params->verbose, params->uninitvalue, params->maxexecutions); @@ -88,7 +83,7 @@ bool install_plugin(char * name) { } void parse_options(struct model_params *params) { - const char *shortopts = "hdnt:o:u:x:v::"; + const char *shortopts = "hnt:o:u:x:v::"; const struct option longopts[] = { {"help", no_argument, NULL, 'h'}, {"verbose", optional_argument, NULL, 'v'}, @@ -124,9 +119,6 @@ void parse_options(struct model_params *params) { case 'h': print_usage(params); break; - case 'd': - params->threadsnocleanup = true; - break; case 'n': params->nofork = true; break; diff --git a/params.h b/params.h index 9a2cf3b9..7f749cae 100644 --- a/params.h +++ b/params.h @@ -9,7 +9,6 @@ struct model_params { unsigned int uninitvalue; int maxexecutions; bool nofork; - bool threadsnocleanup; /** @brief Verbosity (0 = quiet; 1 = noisy; 2 = noisier) */ int verbose; diff --git a/threads.cc b/threads.cc index 5720ff77..8ee3bf97 100644 --- a/threads.cc +++ b/threads.cc @@ -350,7 +350,7 @@ void Thread::complete() if (stack) stack_free(stack); #ifdef TLS - if (this != model->getInitThread() && !model->getParams()->threadsnocleanup) { + if (this != model->getInitThread()) { ASSERT(thread_current()==NULL); real_pthread_mutex_unlock(&mutex2); real_pthread_join(thread, NULL); -- 2.34.1