diff --git a/usb/usb_io.cpp b/usb/usb_io.cpp index 2319eac..f1391cb 100644 --- a/usb/usb_io.cpp +++ b/usb/usb_io.cpp @@ -42,15 +42,15 @@ async_usb_gadget::async_usb_gadget(std::function return; } - auto ep0 = [this](void) -> void + auto ep0 = [this](void*) -> void { thread_read_ep0(); }; - auto task = [this](void) -> void + auto task = [this](void*) -> void { thread_pump_task(); }; - auto bulkw = [this](void) -> void + auto bulkw = [this](void*) -> void { while(run_) { @@ -69,7 +69,7 @@ async_usb_gadget::async_usb_gadget(std::function } } }; - auto bulkr = [this](void) -> void + auto bulkr = [this](void*) -> void { while(run_) { @@ -89,7 +89,7 @@ async_usb_gadget::async_usb_gadget(std::function } }; - auto excep = [&](const char* thread_name) -> void + auto excep = [&](const char* thread_name, void* param) -> void { threads_.stop(thread_name); // threads_.start(task, "thread_pump_task"); @@ -112,10 +112,10 @@ async_usb_gadget::async_usb_gadget(std::function utils::to_log(LOG_LEVEL_DEBUG, "Prepare %u(%u * %u) for IO.\n", io_buf_.size() * unit_out_, io_buf_.size(), unit_in_); #endif - threads_.start(task, SIZE_MB(4), "thread_pump_task", (void*)&async_usb_gadget::thread_pump_task); - threads_.start(bulkw, SIZE_MB(2), "thread_write_bulk", (void*)&async_usb_gadget::thread_write_bulk); - threads_.start(bulkr, SIZE_MB(2), "thread_read_bulk", (void*)&async_usb_gadget::thread_read_bulk); - threads_.start(ep0, SIZE_MB(1), "thread_read_ep0", (void*)&async_usb_gadget::thread_read_ep0); + threads_.start(task, nullptr, SIZE_MB(4), "thread_pump_task", (void*)&async_usb_gadget::thread_pump_task); + threads_.start(bulkw, nullptr, SIZE_MB(2), "thread_write_bulk", (void*)&async_usb_gadget::thread_write_bulk); + threads_.start(bulkr, nullptr, SIZE_MB(2), "thread_read_bulk", (void*)&async_usb_gadget::thread_read_bulk); + threads_.start(ep0, nullptr, SIZE_MB(1), "thread_read_ep0", (void*)&async_usb_gadget::thread_read_ep0); } async_usb_gadget::~async_usb_gadget()