From 568283c0891ff7a0d3612624c9a4d4d365bcbbb6 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Tue, 31 Mar 2026 23:19:01 +0200 Subject: [PATCH] usb dont spawn worker process, because only one USB controller is supported --- usb/usb.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/usb/usb.c b/usb/usb.c index 049c273..6ff79b2 100644 --- a/usb/usb.c +++ b/usb/usb.c @@ -8,17 +8,7 @@ #include #include -static void usb_poll_driver_proc (void* arg) { - struct device_info* info = arg; - - mprintf ("Polling device %s\n", info->key); - - for (;;) { - device_do (info->key, XUSBCTRL_POLL_DRIVER, NULL, NULL, NULL, NULL); - - sched (); - } -} +static void usb_poll_driver_proc (void* arg) { struct device_info* info = arg; } void app_main (void) { libprocess_self_init (); @@ -44,13 +34,14 @@ void app_main (void) { continue; } - struct process_data* pdata = process_spawn (&usb_poll_driver_proc, info); + mprintf ("Polling device %s\n", info->key); - mprintf ("Started USB poller process: PID %d\n", pdata->pid); + for (;;) { + device_do (info->key, XUSBCTRL_POLL_DRIVER, NULL, NULL, NULL, NULL); + + sched (); + } } - - for (;;) - ; } else { mprintf ("ERROR unknown command %s\n", commandbuf); }