summaryrefslogtreecommitdiffstats
path: root/fastos/src/tests/thread_stats_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fastos/src/tests/thread_stats_test.cpp')
-rw-r--r--fastos/src/tests/thread_stats_test.cpp66
1 files changed, 1 insertions, 65 deletions
diff --git a/fastos/src/tests/thread_stats_test.cpp b/fastos/src/tests/thread_stats_test.cpp
index e38fb49a787..a570212b657 100644
--- a/fastos/src/tests/thread_stats_test.cpp
+++ b/fastos/src/tests/thread_stats_test.cpp
@@ -3,71 +3,7 @@
#include <vespa/fastos/fastos.h>
#include "tests.h"
-
-#define PRI_TIME_COUNT 4096
-
-enum JobCode
-{
- PRINT_MESSAGE_AND_WAIT3SEC,
- INCREASE_NUMBER,
- PRIORITY_TEST,
- WAIT_FOR_BREAK_FLAG,
- WAIT_FOR_THREAD_TO_FINISH,
- WAIT_FOR_CONDITION,
- BOUNCE_CONDITIONS,
- TEST_ID,
- WAIT2SEC_AND_SIGNALCOND,
- HOLD_MUTEX_FOR2SEC,
- WAIT_2_SEC,
- SILENTNOP,
- NOP
-};
-
-class Job
-{
-private:
- Job(const Job &);
- Job &operator=(const Job&);
-
-public:
- JobCode code;
- char *message;
- FastOS_Mutex *mutex;
- FastOS_Cond *condition;
- FastOS_BoolCond *boolcondition;
- FastOS_ThreadInterface *otherThread, *ownThread;
- double *timebuf;
- double average;
- int result;
- FastOS_ThreadId _threadId;
- Job *otherjob;
- int bouncewakeupcnt;
- bool bouncewakeup;
-
- Job()
- : code(NOP),
- message(NULL),
- mutex(NULL),
- condition(NULL),
- boolcondition(NULL),
- otherThread(NULL),
- ownThread(NULL),
- timebuf(NULL),
- average(0.0),
- result(-1),
- _threadId(),
- otherjob(NULL),
- bouncewakeupcnt(0),
- bouncewakeup(false)
- {
- }
-
- ~Job()
- {
- if(message != NULL)
- free(message);
- }
-};
+#include "jobs.h"
static volatile int64_t number;
#define INCREASE_NUMBER_AMOUNT 10000