Changeset 339dfc5 in mainline


Ignore:
Timestamp:
2011-01-08T21:36:15Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fa581b3
Parents:
e08a733
git-author:
Vojtech Horky <> (2011-01-08 21:36:15)
git-committer:
Jakub Jermar <jakub@…> (2011-01-08 21:36:15)
Message:

Provide means to specify ARG1 to IPC_M_CONNECT_ME_TO sent by async sessions.

Location:
uspace/lib/c
Files:
2 edited

Legend:

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

    re08a733 r339dfc5  
    154154{
    155155        sess->sess_phone = phone;
     156        sess->connect_arg1 = 0;
    156157        list_initialize(&sess->conn_head);
    157158       
     
    159160        fibril_mutex_lock(&async_sess_mutex);
    160161        list_append(&sess->sess_link, &session_list_head);
     162        fibril_mutex_unlock(&async_sess_mutex);
     163}
     164
     165void async_session_set_connect_args(async_sess_t *sess, sysarg_t arg1)
     166{
     167        fibril_mutex_lock(&async_sess_mutex);
     168        sess->connect_arg1 = arg1;
    161169        fibril_mutex_unlock(&async_sess_mutex);
    162170}
     
    231239                 */
    232240retry:
    233                 data_phone = async_connect_me_to(sess->sess_phone, 0, 0, 0);
     241                data_phone = async_connect_me_to(sess->sess_phone,
     242                    sess->connect_arg1, 0, 0);
    234243                if (data_phone >= 0) {
    235244                        /* success, do nothing */
  • uspace/lib/c/include/async_sess.h

    re08a733 r339dfc5  
    4040typedef struct {
    4141        int sess_phone;         /**< Phone for cloning off the connections. */
     42        sysarg_t connect_arg1;  /**< Argument for CONNECT_ME_TO. */
    4243        link_t conn_head;       /**< List of open data connections. */
    4344        link_t sess_link;       /**< Link in global list of open sessions. */
     
    4647extern void _async_sess_init(void);
    4748extern void async_session_create(async_sess_t *, int);
     49extern void async_session_set_connect_args(async_sess_t *, sysarg_t);
    4850extern void async_session_destroy(async_sess_t *);
    4951extern int async_exchange_begin(async_sess_t *);
Note: See TracChangeset for help on using the changeset viewer.