Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0f4532e in mainline


Ignore:
Timestamp:
2011-08-20T14:55:02Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
93ad49a8
Parents:
a0fc4be
Message:

Make service_connect() work with parallel exchange management.

Location:
uspace/lib/c
Files:
3 edited

Legend:

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

    ra0fc4be r0f4532e  
    16561656       
    16571657        return sess;
     1658}
     1659
     1660/** Shift arguments for new connections left by one.
     1661 *
     1662 * FIXME This is an ugly hack to work around the problem that parallel
     1663 * exchanges are implemented using parallel connections. When we create
     1664 * such a session via a naming server, the naming server shifts the
     1665 * arguments for the initial connection, but not for the latter connections.
     1666 *
     1667 * The proper solution seems to be to implement parallel exchanges using
     1668 * tagging.
     1669 */
     1670void async_sess_args_shift(async_sess_t *sess)
     1671{
     1672        sess->arg1 = sess->arg2;
     1673        sess->arg2 = sess->arg3;
     1674        sess->arg3 = 0;
    16581675}
    16591676
  • uspace/lib/c/generic/ns.c

    ra0fc4be r0f4532e  
    5656        async_exchange_end(exch);
    5757       
     58        /*
     59         * FIXME Ugly hack to work around limitation of implementing
     60         * parallel exchanges using multiple connections. Shift out
     61         * first argument for non-initial connections.
     62         */
     63        async_sess_args_shift(sess);
     64       
    5865        return sess;
    5966}
  • uspace/lib/c/include/async.h

    ra0fc4be r0f4532e  
    333333extern void async_poke(void);
    334334
     335void async_sess_args_shift(async_sess_t *sess);
     336
    335337extern async_exch_t *async_exchange_begin(async_sess_t *);
    336338extern void async_exchange_end(async_exch_t *);
Note: See TracChangeset for help on using the changeset viewer.