Skip to content
Snippets Groups Projects
Commit ae4d5fb5 authored by Izzard's avatar Izzard
Browse files

fix mutex unlock bug

parent 33c8ac18
No related branches found
No related tags found
No related merge requests found
......@@ -3,21 +3,27 @@
# return a string with a list of data objects
# required for the current build of binary_c
# default to gcc
: "${CC:=gcc};"
: "${INCDIRS:=-I.}"
tmpfile=$(mktemp)
if [ -z "$tmpfile" ]; then
echo "Could not make tmpfile in data_object_list.sh"
exit
fi
#echo "INCDIRS is $INCDIRS" > "$tmpfile"
# default to gcc
: "${CC:=gcc};"
: "${INCDIRS:=-I.}"
# remove tmpfile on script exit
trap 'rm -f -- "$tmpfile"' INT TERM HUP EXIT
#trap 'rm -f -- "$tmpfile"' INT TERM HUP EXIT
# make defined macro list in tmpfile
"$CC" "$INCDIRS" -dM -E main.c > "$tmpfile"
#echo "in dir $PWD" >> "$tmpfile"
#echo $CC $INCDIRS -dM -E main.c >> "$tmpfile"
$CC $INCDIRS -dM -E main.c >> "$tmpfile"
# function to determine dependency
function dependency {
......
......@@ -1239,8 +1239,8 @@ cflags += [
#if os != 'darwin'
if 1 == 1
message('Checking and building data objects')
data_objects_compilation = run_command('meson/data_object_list_and_build.sh')
# for debugging, only list the objects with the following
# data_objects_compilation = run_command('meson/data_object_list.sh')
......@@ -1248,7 +1248,8 @@ if 1 == 1
error('There was a problem building the data objects. Please check that you have objcopy installed, and try running meson/data_object_list_and_build.sh from the binary_c root directory manually to check for errors')
endif
data_objects = data_objects_compilation.stdout().strip().split(' ')
message('data_objects = ' + data_objects_compilation.stdout())
if get_option('clean_data_objects') == true
run_command('meson/clean_data_objects.sh')
endif
......
......@@ -13,4 +13,7 @@ cd src || exit 1
############################################################
# list them
../data_object_list.sh | sed -e s/^/src\\// |sed -e 's/[[:space:]]*$//'| sed s/\ /\ src\\//g
#../meson/data_object_list.sh | sed -e s/^/src\\// |sed -e 's/[[:space:]]*$//'| sed s/\ /\ src\\//g
../meson/data_object_list.sh
......@@ -486,11 +486,14 @@ void MINT_load_MS_grid(struct stardata_t * const stardata)
if(allocated_filename)
{
Safe_free(MS_file);
Dprint("free MS_file\n");
Safe_free(MS_file);
}
}
}
Dprint("Loaded grid\n");
#ifdef __TEST
if(0)
{
......
......@@ -48,12 +48,17 @@ int MINT_load_grid(struct stardata_t * const stardata)
#undef X
for(unsigned int i=0; i<MINT_TABLE_NUMBER; i++)
{
if(functions[i] != NULL)
Dprint("Mint load function %u is %p\n",
i,
Cast_function_pointer(functions[i]));
if(functions[i] != NULL)
{
functions[i](stardata);
}
Dprint("Returned from mint load function %u\n",i);
}
Dprint("loaded grid functions\n");
return 0;
}
#endif // MINT
......@@ -1206,7 +1206,7 @@ void Print_trace(void);
*/
#ifdef __HAVE_LIBPTHREAD__
#define Pthread_lock(X) pthread_mutex_lock(&stardata->store->X);
#define Pthread_unlock(X) pthread_mutex_lock(&stardata->store->X);
#define Pthread_unlock(X) pthread_mutex_unlock(&stardata->store->X);
#else
/* do nothing if we have no pthread */
#define Pthread_lock(X)
......
......@@ -1038,10 +1038,10 @@ sub local_setup
# $res is the resolution multiplier.
# If using the time-adaptive mass grid, m and m1 are ignored.
my $res = 40; # 40; # 100 for M2, Period
my $res = 10; # 40; # 100 for M2, Period
my %resolution=(
m=>120, # single stars
m1=>120, # binary stars
m=>40, # single stars
m1=>40, # binary stars
m2=>$res,
per=>(($args=~/nper=(\d+)/)[0] // ($res)),
perzoomf=>0.1, # zoom in ~ AGB RLOF region (0.1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment