From fe0b06bb9be51b98120c2d05c25350d44839068a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 1 Feb 2010 20:03:07 +0000 Subject: Remove clearly worthless (doesn't event parse, let alone compile) TRANSZPORT_THREADS stuff. git-svn-id: svn://localhost/ardour2/branches/3.0@6612 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/tranzport/init.cc | 19 ++----------------- libs/surfaces/tranzport/tranzport_base.h | 1 - libs/surfaces/tranzport/tranzport_control_protocol.h | 8 +------- 3 files changed, 3 insertions(+), 25 deletions(-) (limited to 'libs/surfaces/tranzport') diff --git a/libs/surfaces/tranzport/init.cc b/libs/surfaces/tranzport/init.cc index 7d6ee22206..289d4d79a7 100644 --- a/libs/surfaces/tranzport/init.cc +++ b/libs/surfaces/tranzport/init.cc @@ -88,16 +88,6 @@ TranzportControlProtocol::set_active (bool yn) if (pthread_create_and_store (X_("tranzport monitor"), &thread, _monitor_work, this) == 0) { _active = true; -#if TRANZPORT_THREADS - if (pthread_create_and_store (X_("tranzport read"), &thread_read, _read_work, this) == 0) { - _active_read = true; - if (pthread_create_and_store (X_("tranzport write"), &thread_write, _write_work, this) == 0) { - _active_write = true; - if (pthread_create_and_store (X_("tranzport process"), &thread_process, _process_work, this) == 0) { - _active_process = true; - if (pthread_create_and_store (X_("tranzport timer"), &thread_timer, _process_timer, this) == 0) { - _active_process = true; -#endif } else { return -1; } @@ -112,19 +102,14 @@ TranzportControlProtocol::set_active (bool yn) // thread FIXME - wait til all writes are done for(int x = 0; (x < 20/MAX_TRANZPORT_INFLIGHT) && flush(); x++) { usleep(100); } } -#if TRANZPORT_THREADS - pthread_cancel_one (_thread_timer); - pthread_cancel_one (_thread_process); - pthread_cancel_one (_thread_read); - pthread_cancel_one (_thread_write); -#endif + pthread_cancel_one (thread); cerr << "Tranzport Thread dead\n"; close (); _active = false; cerr << "End tranzport shutdown\n"; - } + } } return 0; diff --git a/libs/surfaces/tranzport/tranzport_base.h b/libs/surfaces/tranzport/tranzport_base.h index 510f24fdfe..ef77748c50 100644 --- a/libs/surfaces/tranzport/tranzport_base.h +++ b/libs/surfaces/tranzport/tranzport_base.h @@ -49,7 +49,6 @@ #define MAX_RETRY 1 #define MAX_TRANZPORT_INFLIGHT 4 #define DEBUG_TRANZPORT 0 -#define TRANZPORT_THREADS 0 #ifndef HAVE_TRANZPORT_KERNEL_DRIVER #define HAVE_TRANZPORT_KERNEL_DRIVER 0 diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.h b/libs/surfaces/tranzport/tranzport_control_protocol.h index 4cb61348fe..e85234c7a3 100644 --- a/libs/surfaces/tranzport/tranzport_control_protocol.h +++ b/libs/surfaces/tranzport/tranzport_control_protocol.h @@ -145,7 +145,7 @@ private: BlingEnter, BlingExit }; - + pthread_t thread; #if HAVE_TRANZPORT_KERNEL_DRIVER int udev; @@ -153,18 +153,12 @@ private: usb_dev_handle* udev; #endif -#if TRANZPORT_THREADS - pthread_t thread_read; -#endif int last_read_error; uint32_t buttonmask; uint32_t timeout; uint32_t inflight; uint32_t current_track_id; -#if TRANZPORT_THREADS - pthread_t thread_write; -#endif int last_write_error; uint8_t _datawheel; uint8_t _device_status; -- cgit v1.2.3