Changeset 8cc4ddb in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2011-08-28T21:16:54Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f0f8bc
Parents:
1a5b252 (diff), 36e2b55 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r1a5b252 r8cc4ddb  
    17771777int async_hangup(async_sess_t *sess)
    17781778{
     1779        async_exch_t *exch;
     1780       
    17791781        assert(sess);
    17801782       
    17811783        if (atomic_get(&sess->refcnt) > 0)
    17821784                return EBUSY;
     1785       
     1786        fibril_mutex_lock(&async_sess_mutex);
    17831787       
    17841788        int rc = async_hangup_internal(sess->phone);
    17851789        if (rc == EOK)
    17861790                free(sess);
     1791       
     1792        while (!list_empty(&sess->exch_list)) {
     1793                exch = (async_exch_t *)
     1794                    list_get_instance(list_first(&sess->exch_list),
     1795                    async_exch_t, sess_link);
     1796               
     1797                list_remove(&exch->sess_link);
     1798                list_remove(&exch->global_link);
     1799                async_hangup_internal(exch->phone);
     1800                free(exch);
     1801        }
     1802       
     1803        fibril_mutex_unlock(&async_sess_mutex);
    17871804       
    17881805        return rc;
Note: See TracChangeset for help on using the changeset viewer.