summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-11-19 18:00:33 +0100
committerHaru <haru@dotalux.com>2016-11-19 21:08:11 +0100
commitddd36bc9c37f0ee946441b953bb2bd89cbe70b2e (patch)
tree5aee218723ad93a211c4ecf59ec82dce36e686ad /src
parent71cfb20ebbb191d3b5521ed9196ae6b45e55630f (diff)
downloadhercules-ddd36bc9c37f0ee946441b953bb2bd89cbe70b2e.tar.gz
hercules-ddd36bc9c37f0ee946441b953bb2bd89cbe70b2e.tar.bz2
hercules-ddd36bc9c37f0ee946441b953bb2bd89cbe70b2e.tar.xz
hercules-ddd36bc9c37f0ee946441b953bb2bd89cbe70b2e.zip
Fix a compilation warning in test_spinlock
Diffstat (limited to 'src')
-rw-r--r--src/test/test_spinlock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c
index 27d742cd1..1c0390d66 100644
--- a/src/test/test_spinlock.c
+++ b/src/test/test_spinlock.c
@@ -81,6 +81,7 @@ int do_init(int argc, char **argv)
for(i =0; i < THRC; i++){
t[i] = thread->create_opt(worker, NULL, 1024*512, THREADPRIO_NORMAL);
}
+ (void)t;
while(1){
if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC)
@@ -100,14 +101,13 @@ int do_init(int argc, char **argv)
}
- if(ok != LOOPS){
+ if (ok != LOOPS) {
ShowFatalError("Test failed.\n");
exit(1);
- }else{
- ShowStatus("Test passed.\n");
- exit(0);
}
- return 0;
+
+ core->runflag = CORE_ST_STOP;
+ return EXIT_SUCCESS;
}//end: do_init()
void do_abort(void) {
@@ -118,6 +118,8 @@ void set_server_type(void) {
}//end: set_server_type()
int do_final(void) {
+ ShowStatus("Test passed.\n");
+
return EXIT_SUCCESS;
}//end: do_final()