ms: get rid of std::thread

2fc2b594da6e329577b195cb2543a8dd9e1b9ed0 changed std::thread to pthread
for proper affinity to circumvent startup issues, so just stick to
pthread instead of mixing std::thread and pthread, which made tracking
thread creation difficult due to different functions.

Change-Id: I0ba2fd958530394b9d99ed82111064d428c5870f
diff --git a/Transceiver52M/ms/ms.cpp b/Transceiver52M/ms/ms.cpp
index b8710a6..4ae8668 100644
--- a/Transceiver52M/ms/ms.cpp
+++ b/Transceiver52M/ms/ms.cpp
@@ -35,6 +35,8 @@
 #include "sch.h"
 }
 
+#include "threadsched.h"
+
 dummylog ms_trx::dummy_log;
 
 #ifdef DBGXX
@@ -83,13 +85,11 @@
 	if (stop_lower_threads_flag)
 		return;
 	auto fn = get_rx_burst_handler_fn(rx_bh());
-	lower_rx_task = std::thread(fn);
-	set_name_aff_sched(lower_rx_task.native_handle(), sched_params::thread_names::RXRUN);
+	lower_rx_task = spawn_worker_thread(sched_params::thread_names::RXRUN, fn, this);
 
 	usleep(1000);
 	auto fn2 = get_tx_burst_handler_fn(tx_bh());
-	lower_tx_task = std::thread(fn2);
-	set_name_aff_sched(lower_tx_task.native_handle(), sched_params::thread_names::TXRUN);
+	lower_tx_task = spawn_worker_thread(sched_params::thread_names::TXRUN, fn2, this);
 
 	actually_enable_streams();
 }
@@ -105,9 +105,9 @@
 	stop_lower_threads_flag = true;
 	close_device();
 	std::cerr << "dev closed..." << std::endl;
-	lower_rx_task.join();
+	pthread_join(lower_rx_task, nullptr);
 	std::cerr << "L rx dead..." << std::endl;
-	lower_tx_task.join();
+	pthread_join(lower_tx_task, nullptr);
 	std::cerr << "L tx dead..." << std::endl;
 }