Skip to content

Commit 639427c

Browse files
author
Herbert Koelman
committed
refs #41
* use large memory model (-bmaxdata:0x80000000)
1 parent 1a3a39c commit 639427c

File tree

4 files changed

+31
-65
lines changed

4 files changed

+31
-65
lines changed

tests/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ RANLIB=@RANLIB@
2020
RM=rm -f
2121
AR=@AR@
2222
MV=@MV@
23-
BEAUTIFIER=@BEAUTIFIER@
2423

2524
BITS=@BITS@
2625
OBJECT_MODE=$(BITS)

tests/configure

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,6 @@ EGREP
630630
GREP
631631
CXXCPP
632632
RANLIB
633-
BEAUTIFIER
634633
MV
635634
AR
636635
ac_ct_CC
@@ -3194,44 +3193,6 @@ $as_echo "no" >&6; }
31943193
fi
31953194

31963195

3197-
# Extract the first word of "uncrustify", so it can be a program name with args.
3198-
set dummy uncrustify; ac_word=$2
3199-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3200-
$as_echo_n "checking for $ac_word... " >&6; }
3201-
if ${ac_cv_prog_BEAUTIFIER+:} false; then :
3202-
$as_echo_n "(cached) " >&6
3203-
else
3204-
if test -n "$BEAUTIFIER"; then
3205-
ac_cv_prog_BEAUTIFIER="$BEAUTIFIER" # Let the user override the test.
3206-
else
3207-
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3208-
for as_dir in $PATH
3209-
do
3210-
IFS=$as_save_IFS
3211-
test -z "$as_dir" && as_dir=.
3212-
for ac_exec_ext in '' $ac_executable_extensions; do
3213-
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3214-
ac_cv_prog_BEAUTIFIER="uncrustify -l CPP --replace -c ../crust.cfg *.bsr *.bcl *.cpp *.hpp"
3215-
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3216-
break 2
3217-
fi
3218-
done
3219-
done
3220-
IFS=$as_save_IFS
3221-
3222-
test -z "$ac_cv_prog_BEAUTIFIER" && ac_cv_prog_BEAUTIFIER="echo \"install crustify to run beautifier\""
3223-
fi
3224-
fi
3225-
BEAUTIFIER=$ac_cv_prog_BEAUTIFIER
3226-
if test -n "$BEAUTIFIER"; then
3227-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BEAUTIFIER" >&5
3228-
$as_echo "$BEAUTIFIER" >&6; }
3229-
else
3230-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3231-
$as_echo "no" >&6; }
3232-
fi
3233-
3234-
32353196
if test -n "$ac_tool_prefix"; then
32363197
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
32373198
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -3760,14 +3721,12 @@ then
37603721
BITS="64"
37613722

37623723
BITS=64
3763-
#CXXFLAGS="-m$ac_cv_sizeof_long $CXXFLAGS -I ../include -I ./"
37643724
else
37653725
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using 32 bits (default)" >&5
37663726
$as_echo "using 32 bits (default)" >&6; }
37673727
BITS="32"
37683728

37693729
BITS=32
3770-
#CXXFLAGS="-m$ac_cv_sizeof_long $CXXFLAGS -I ../include -I ./"
37713730
fi
37723731

37733732
OBJECTS=""
@@ -3784,7 +3743,8 @@ $as_echo_n "checking for specific $CXX compiler options... " >&6; }
37843743
case "$CXX" in
37853744
xlC_r | xlC)
37863745
CPPFLAGS="-qlanglvl=extended0x:decltype:static_assert:rvaluereferences:rvaluereferences -qsourcetype=c++ -O $CPPFLAGS"
3787-
CFLAGS="-bh:5 -O -q$BITS $CFLAGS"
3746+
CFLAGS="-bh:5 -O -qmaxmem=-1 -q$BITS $CFLAGS"
3747+
# LDFLAGS="$LDFLASG -brtl -bmaxdata:0x80000000"
37883748
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37893749
$as_echo "yes" >&6; }
37903750
;;

tests/configure.ac

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ AC_PROG_CXX([xlC_r xlC g++ c++ gcc cl KCC CC cxx cc++ aCC ])
1212
AC_PROG_CC([xlc xlc_r gcc cl cc])
1313
AC_CHECK_PROG([AR],[ar],[ar -rv])
1414
AC_CHECK_PROG([MV],[mv],[mv],[echo "no mv command found"])
15-
AC_CHECK_PROG([BEAUTIFIER],[uncrustify],[uncrustify -l CPP --replace -c ../crust.cfg *.bsr *.bcl *.cpp *.hpp],[echo \"install crustify to run beautifier\"])
1615
AC_PROG_RANLIB
1716

1817
CFLAGS="$CFLAGS -I ../include -I ./"
@@ -23,12 +22,10 @@ if test $ac_cv_sizeof_long == "8"
2322
then
2423
AC_SUBST(BITS,"64")
2524
BITS=64
26-
#CXXFLAGS="-m$ac_cv_sizeof_long $CXXFLAGS -I ../include -I ./"
2725
else
2826
AC_MSG_RESULT([using 32 bits (default)])
2927
AC_SUBST(BITS,"32")
3028
BITS=32
31-
#CXXFLAGS="-m$ac_cv_sizeof_long $CXXFLAGS -I ../include -I ./"
3229
fi
3330

3431
OBJECTS=""
@@ -43,7 +40,8 @@ AC_MSG_CHECKING([for specific $CXX compiler options])
4340
case "$CXX" in
4441
xlC_r | xlC)
4542
CPPFLAGS="-qlanglvl=extended0x:decltype:static_assert:rvaluereferences:rvaluereferences -qsourcetype=c++ -O $CPPFLAGS"
46-
CFLAGS="-bh:5 -brtl -O -q$BITS $CFLAGS"
43+
CFLAGS="-bh:5 -O -qmaxmem=-1 -q$BITS $CFLAGS"
44+
LDFLAGS="$LDFLAGS -brtl -bmaxdata:0x80000000"
4745
AC_MSG_RESULT([yes])
4846
;;
4947
g++ | gcc)

tests/without-cpp11-pthread-tests.cpp

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,35 @@ class worker: public pthread::abstract_thread {
4747
#else
4848
void run() noexcept override {
4949
#endif
50-
message("worker: " + msg);
51-
{
52-
pthread::lock_guard<pthread::mutex> lck(mtx);
53-
54-
message("running worker class. wait max 2s for condition to be signaled");
55-
bool stop_waiting = true;
56-
auto delay = _sleep;
57-
while ( ! (stop_waiting = (counter >= 10000)) && (condition.wait_for(mtx, delay) == pthread::cv_status::no_timeout)){
58-
delay = -1 ;
59-
}
60-
if ( counter >= 10000 ) {
61-
message("worker class, counter >= 10000");
62-
} else {
63-
message("worker class, counter < 10000");
50+
try {
51+
message("worker: " + msg);
52+
{
53+
pthread::lock_guard<pthread::mutex> lck(mtx);
54+
55+
message("running worker class. wait max 2s for condition to be signaled");
56+
bool stop_waiting = true;
57+
auto delay = _sleep;
58+
while ( ! (stop_waiting = (counter >= 10000)) && (condition.wait_for(mtx, delay) == pthread::cv_status::no_timeout)){
59+
delay = -1 ;
60+
}
61+
if ( counter >= 10000 ) {
62+
message("worker class, counter >= 10000");
63+
} else {
64+
message("worker class, counter < 10000");
65+
}
6466
}
67+
68+
message("worker sleeping");
69+
pthread::this_thread::sleep(200);
70+
message("worker class is ending");
71+
72+
} catch ( pthread::pthread_exception &err ){
73+
message(err.what());
74+
} catch ( std::exception &err ) {
75+
message(err.what());
76+
} catch ( ... ) {
77+
message("Unexpected exception was thrown.");
6578
}
66-
67-
message("worker sleeping");
68-
pthread::this_thread::sleep(200);
69-
message("worker class is ending");
7079
};
7180

7281
private:

0 commit comments

Comments
 (0)