Changeset f3baab1 in mainline for uspace/drv/bus/usb/xhci/commands.c


Ignore:
Timestamp:
2018-01-11T21:41:36Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49e62998
Parents:
665368c
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-11 21:41:34)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-11 21:41:36)
Message:

xhci: do not rely on internal fibril quirks

Previousy, we abused the fact new fibrils are spawned for handling
notifications, so we could afford blocking the event handler. We were
told this is a subject to change and we should stop doing it.

This commit removes the abuse, but newly requires event handlers not to
block waiting for another event (e.g. commands do wait for events). To
quickly detect this situation, deadlock detection was added.

This commit breaks current functionality. Our current job is to identify
processes which do block and have them moved to separate fibril / spawn
fibril for the process alone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/commands.c

    r665368c rf3baab1  
    666666        int rv = EOK;
    667667
     668        if (fibril_get_id() == hc->event_handler) {
     669                usb_log_error("Deadlock detected in waiting for command.");
     670                abort();
     671        }
     672
    668673        fibril_mutex_lock(&cmd->_header.completed_mtx);
    669674        while (!cmd->_header.completed) {
Note: See TracChangeset for help on using the changeset viewer.