Skip to content

Commit 5bb57a9

Browse files
committed
configure: reverting change I need to talk with Ricky about ..
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4312 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
1 parent aac9fbe commit 5bb57a9

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function fix_cxx_flag {
327327
CXXCOMPILER=`grep "CXX = " kaldi.mk | awk '{print $3}'`
328328
if [ $CXXCOMPILER=="g++" ]; then
329329
$CXXCOMPILER -dumpversion | \
330-
awk '{if(NR==1 && $$1<"4.8") print "sed \"s/-Wno-unused-local-typedefs/-Wall/g\" \
330+
awk '{if(NR==1 && $1<"4.4") print "sed \"s/-Wno-unused-local-typedefs//g\" \
331331
kaldi.mk > tmpf; mv tmpf kaldi.mk; "}' | sh -
332332
fi
333333
}

src/thread/kaldi-thread-test.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "base/kaldi-common.h"
2323
#include "thread/kaldi-thread.h"
24+
#include "thread/kaldi-mutex.h"
2425

2526
namespace kaldi {
2627

@@ -80,11 +81,29 @@ void TestThreads() {
8081
}
8182
}
8283

84+
void TestMutex() {
85+
for (int32 i = 0; i < 4; i++) {
86+
Mutex mut;
87+
for (int32 i = 0; i < 100; i++) {
88+
if (rand() % 2 == 0) {
89+
mut.Lock();
90+
KALDI_ASSERT(!mut.TryLock());
91+
mut.Unlock();
92+
} else {
93+
KALDI_ASSERT(mut.TryLock());
94+
mut.Unlock();
95+
}
96+
}
97+
}
98+
}
99+
100+
83101

84102
} // end namespace kaldi.
85103

86104
int main() {
87105
using namespace kaldi;
88106
TestThreads();
107+
TestMutex();
89108
}
90109

0 commit comments

Comments
 (0)