From cde1ee8fa147dfd15dc5c5b43093cd8c8a402b74 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Wed, 16 Jan 2008 21:54:11 +0000 Subject: 0.41-0 test 11 svn path=/trunk/; revision=9147 --- pd/portmidi/porttime/ptlinux.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'pd/portmidi/porttime/ptlinux.c') diff --git a/pd/portmidi/porttime/ptlinux.c b/pd/portmidi/porttime/ptlinux.c index c99abf04..468575aa 100644 --- a/pd/portmidi/porttime/ptlinux.c +++ b/pd/portmidi/porttime/ptlinux.c @@ -21,7 +21,13 @@ CHANGE LOG thread. Simplified implementation notes. */ - +/* stdlib, stdio, unistd, and sys/types were added because they appeared + * in a Gentoo patch, but I'm not sure why they are needed. -RBD + */ +#include +#include +#include +#include #include "porttime.h" #include "sys/time.h" #include "sys/resource.h" @@ -63,8 +69,8 @@ static void *Pt_CallbackProc(void *p) select(0, NULL, NULL, NULL, &timeout); (*(parameters->callback))(Pt_Time(), parameters->userData); } - printf("Pt_CallbackProc exiting\n"); -// free(parameters); + /* printf("Pt_CallbackProc exiting\n"); */ + // free(parameters); return NULL; } @@ -93,8 +99,9 @@ PtError Pt_Start(int resolution, PtCallback *callback, void *userData) PtError Pt_Stop() { - printf("Pt_Stop called\n"); + /* printf("Pt_Stop called\n"); */ pt_callback_proc_id++; + pthread_join(pt_thread_pid, NULL); time_started_flag = FALSE; return ptNoError; } -- cgit v1.2.1