Minor changes to tests; fix typo; tidy up.

This commit is contained in:
counterpoint
2014-10-03 15:47:03 +01:00
parent 7dc9cf78f6
commit e17607b0d3
4 changed files with 4 additions and 6 deletions

View File

@ -277,8 +277,6 @@ return_clonebuf:
GWBUF * GWBUF *
gwbuf_append(GWBUF *head, GWBUF *tail) gwbuf_append(GWBUF *head, GWBUF *tail)
{ {
GWBUF *ptr = head;
if (!head) if (!head)
return tail; return tail;
CHK_GWBUF(head); CHK_GWBUF(head);

View File

@ -131,7 +131,7 @@ CONFIG_PARAMETER *param, *p1;
ptr->element = NULL; ptr->element = NULL;
cntxt->next = ptr; cntxt->next = ptr;
} }
/* Check to see if the paramter already exists for the section */ /* Check to see if the parameter already exists for the section */
p1 = ptr->parameters; p1 = ptr->parameters;
while (p1) while (p1)
{ {

View File

@ -128,7 +128,7 @@ spinlock_release(SPINLOCK *lock)
lock->max_waiting = lock->waiting; lock->max_waiting = lock->waiting;
#endif #endif
#ifdef __GNUC__ #ifdef __GNUC__
__sync_synchronize(); // Memory barrier. __sync_synchronize(); /* Memory barrier. */
lock->lock = 0; lock->lock = 0;
#else #else
atomic_add(&(lock->lock), -1); atomic_add(&(lock->lock), -1);

View File

@ -135,7 +135,7 @@ struct timespec sleeptime;
* Start multiple threads that obtain spinlock and run process bound * Start multiple threads that obtain spinlock and run process bound
*/ */
#define THREADS 5 #define THREADS 5
#define ITERATIONS 25000 #define ITERATIONS 50000
#define PROCESS_LOOP 10000 #define PROCESS_LOOP 10000
#define SECONDS 15 #define SECONDS 15
#define NANOTIME 100000 #define NANOTIME 100000
@ -184,7 +184,7 @@ time_t rawtime;
} }
active = 0; active = 0;
spinlock_release(&lck); spinlock_release(&lck);
for (i=0; i<(8*PROCESS_LOOP); i++); for (i=0; i<(4*PROCESS_LOOP); i++);
// nanosleep(&sleeptime, NULL); // nanosleep(&sleeptime, NULL);
} }
spinlock_release(&lck); spinlock_release(&lck);