修复USB线程参数
This commit is contained in:
parent
ca0ab06dcc
commit
e71ca215c3
|
@ -42,15 +42,15 @@ async_usb_gadget::async_usb_gadget(std::function<FUNCTION_PROTO_COMMAND_HANDLE>
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ep0 = [this](void) -> void
|
auto ep0 = [this](void*) -> void
|
||||||
{
|
{
|
||||||
thread_read_ep0();
|
thread_read_ep0();
|
||||||
};
|
};
|
||||||
auto task = [this](void) -> void
|
auto task = [this](void*) -> void
|
||||||
{
|
{
|
||||||
thread_pump_task();
|
thread_pump_task();
|
||||||
};
|
};
|
||||||
auto bulkw = [this](void) -> void
|
auto bulkw = [this](void*) -> void
|
||||||
{
|
{
|
||||||
while(run_)
|
while(run_)
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ async_usb_gadget::async_usb_gadget(std::function<FUNCTION_PROTO_COMMAND_HANDLE>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
auto bulkr = [this](void) -> void
|
auto bulkr = [this](void*) -> void
|
||||||
{
|
{
|
||||||
while(run_)
|
while(run_)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ async_usb_gadget::async_usb_gadget(std::function<FUNCTION_PROTO_COMMAND_HANDLE>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
auto excep = [&](const char* thread_name) -> void
|
auto excep = [&](const char* thread_name, void* param) -> void
|
||||||
{
|
{
|
||||||
threads_.stop(thread_name);
|
threads_.stop(thread_name);
|
||||||
// threads_.start(task, "thread_pump_task");
|
// threads_.start(task, "thread_pump_task");
|
||||||
|
@ -112,10 +112,10 @@ async_usb_gadget::async_usb_gadget(std::function<FUNCTION_PROTO_COMMAND_HANDLE>
|
||||||
utils::to_log(LOG_LEVEL_DEBUG, "Prepare %u(%u * %u) for IO.\n", io_buf_.size() * unit_out_, io_buf_.size(), unit_in_);
|
utils::to_log(LOG_LEVEL_DEBUG, "Prepare %u(%u * %u) for IO.\n", io_buf_.size() * unit_out_, io_buf_.size(), unit_in_);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
threads_.start(task, SIZE_MB(4), "thread_pump_task", (void*)&async_usb_gadget::thread_pump_task);
|
threads_.start(task, nullptr, 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(bulkw, nullptr, 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(bulkr, nullptr, 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(ep0, nullptr, SIZE_MB(1), "thread_read_ep0", (void*)&async_usb_gadget::thread_read_ep0);
|
||||||
}
|
}
|
||||||
|
|
||||||
async_usb_gadget::~async_usb_gadget()
|
async_usb_gadget::~async_usb_gadget()
|
||||||
|
|
Loading…
Reference in New Issue