Changeset 398c4d7 in mainline for uspace/lib/c/generic/devman.c


Ignore:
Timestamp:
2010-12-01T23:51:29Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c245f16e
Parents:
2edcb63
Message:

More conservative locking in devman

Add mutex guard when accessing driver_t structure during driver assigning.

Added missing async_wait_for and removed extra mutex_unlock.

To speed-up answer time, driver start is done in separate fibril to avoid
blocking IPC connection fibril.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/devman.c

    r2edcb63 r398c4d7  
    116116{
    117117        ipc_call_t answer;
    118         async_send_1(phone, DEVMAN_ADD_MATCH_ID, match_id->score, &answer);
     118        aid_t req = async_send_1(phone, DEVMAN_ADD_MATCH_ID, match_id->score, &answer);
    119119        int retval = async_data_write_start(phone, match_id->id, str_size(match_id->id));
    120         return retval; 
     120        async_wait_for(req, NULL);
     121        return retval;
    121122}
    122123
Note: See TracChangeset for help on using the changeset viewer.