diff --git a/tests/testSem.cpp b/tests/testSem.cpp index 7bebd282..3cc7c7f0 100644 --- a/tests/testSem.cpp +++ b/tests/testSem.cpp @@ -61,8 +61,7 @@ struct ServerThread : public JackRunnableInterface { bool Execute() { printf("Execute Server\n"); - for (int i = 0; i < ITER; i++) - { + for (int i = 0; i < ITER; i++) { fClientSem->Signal(); fServerSem->Wait(); } @@ -100,8 +99,7 @@ struct ClientThread : public JackRunnableInterface { fClientSem->Wait(); gettimeofday(&T0, 0); - for (int i = 0; i < ITER; i++) - { + for (int i = 0; i < ITER; i++) { fServerSem->Signal(); fClientSem->Wait(); } diff --git a/tests/testThread.cpp b/tests/testThread.cpp index 7c817f1a..de012f77 100644 --- a/tests/testThread.cpp +++ b/tests/testThread.cpp @@ -38,29 +38,29 @@ void* ThreadHandler(void* arg) char c; printf("ThreadHandler\n"); try { - while (1) { - read(fFifo, &c, sizeof(c)); - sleep (1); - //pthread_testcancel(); - } - }catch (std::exception e) {} + while (1) { + read(fFifo, &c, sizeof(c)); + sleep(1); + //pthread_testcancel(); + } + } catch (std::exception e) {} } -int main (int argc, char * const argv[]) +int main(int argc, char * const argv[]) { int res; void* status; struct stat statbuf; printf("Thread test\n"); - std::set_terminate (__gnu_cxx::__verbose_terminate_handler); + std::set_terminate(__gnu_cxx::__verbose_terminate_handler); sprintf(fName, "/tmp/fifo"); if (stat(fName, &statbuf)) { if (errno == ENOENT) { - if (mkfifo(fName, 0666) < 0){ + if (mkfifo(fName, 0666) < 0) { printf("Cannot create inter-client FIFO [%s]\n", fName); return 0; } @@ -85,7 +85,7 @@ int main (int argc, char * const argv[]) return 0; } - sleep (3); + sleep(3); printf("Cancel Thread\n"); pthread_cancel(fThread); pthread_join(fThread, &status);