mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
pid_t: unify usage of special task IDs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
2ee12b2c5d
commit
68902d8732
@@ -1689,16 +1689,17 @@ int usbmsc_exportluns(FAR void *handle)
|
||||
g_usbmsc_handoff = priv;
|
||||
|
||||
uinfo("Starting SCSI worker thread\n");
|
||||
priv->thpid = kthread_create("scsid", CONFIG_USBMSC_SCSI_PRIO,
|
||||
CONFIG_USBMSC_SCSI_STACKSIZE,
|
||||
usbmsc_scsi_main, NULL);
|
||||
if (priv->thpid <= 0)
|
||||
ret = kthread_create("scsid", CONFIG_USBMSC_SCSI_PRIO,
|
||||
CONFIG_USBMSC_SCSI_STACKSIZE,
|
||||
usbmsc_scsi_main, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_THREADCREATE),
|
||||
(uint16_t)priv->thpid);
|
||||
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_THREADCREATE), (uint16_t)ret);
|
||||
goto errout_with_lock;
|
||||
}
|
||||
|
||||
priv->thpid = (pid_t)ret;
|
||||
|
||||
/* Wait for the worker thread to run and initialize */
|
||||
|
||||
uinfo("Waiting for the SCSI worker thread\n");
|
||||
|
||||
Reference in New Issue
Block a user