From e8a0cc88379705943cb632fc8929cc38435edacf Mon Sep 17 00:00:00 2001 From: John Vu Date: Tue, 11 Aug 2009 19:44:37 +0000 Subject: [PATCH] ICU-6052 Added empty functions for no threads. X-SVN-Rev: 26478 --- icu4c/source/test/intltest/simplethread.cpp | 41 +++++++++++++-------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/icu4c/source/test/intltest/simplethread.cpp b/icu4c/source/test/intltest/simplethread.cpp index b198749475c..2563baeec05 100644 --- a/icu4c/source/test/intltest/simplethread.cpp +++ b/icu4c/source/test/intltest/simplethread.cpp @@ -23,6 +23,11 @@ #include "unicode/uloc.h" #include "unicode/locid.h" #include "putilimp.h" + +#include +#include +#include // tolower, toupper + #if !defined(U_WINDOWS) && !defined(XP_MAC) && !defined(U_RHAPSODY) #define POSIX 1 #endif @@ -38,8 +43,8 @@ #include /*#include "platform_xopen_source_extended.h"*/ #endif -#if defined(POSIX) || defined(U_SOLARIS) || defined(U_AIX) || defined(U_HPUX) +#if defined(POSIX) || defined(U_SOLARIS) || defined(U_AIX) || defined(U_HPUX) #define HAVE_IMP #if (ICU_USE_THREADS == 1) @@ -90,24 +95,30 @@ #if (ICU_USE_THREADS==0) -/*void MultithreadTest::runIndexedTest( int32_t index, UBool exec, - const char* &name, char* ) { - if (exec) logln("TestSuite MultithreadTest: "); + SimpleThread::SimpleThread() + {} - if(index == 0) - name = "NO_THREADED_TESTS"; - else - name = ""; + SimpleThread::~SimpleThread() + {} - if(exec) { logln("MultithreadTest - test DISABLED. ICU_USE_THREADS set to 0, check your configuration if this is a problem.."); - } -}*/ + int32_t + SimpleThread::start() + { return -1; } + + void + SimpleThread::run() + {} + + void + SimpleThread::sleep(int32_t millis) + {} + + UBool + SimpleThread::isRunning() { + return FALSE; + } #else -#include -#include -#include // tolower, toupper - #include "unicode/putil.h" /* for mthreadtest*/