Ignore:
Timestamp:
2018-05-31T16:11:01Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c8afd5a
Parents:
fda19b8
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-31 15:19:10)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-31 16:11:01)
Message:

Split the async framework into several parts.

This segregates existing code into three separate files,
to make the async framework easier to navigate and understand.

File:
1 edited

Legend:

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

    rfda19b8 r49a796f1  
    8181} awaiter_t;
    8282
     83/** Session data */
     84struct async_sess {
     85        /** List of inactive exchanges */
     86        list_t exch_list;
     87
     88        /** Session interface */
     89        iface_t iface;
     90
     91        /** Exchange management style */
     92        exch_mgmt_t mgmt;
     93
     94        /** Session identification */
     95        cap_phone_handle_t phone;
     96
     97        /** First clone connection argument */
     98        sysarg_t arg1;
     99
     100        /** Second clone connection argument */
     101        sysarg_t arg2;
     102
     103        /** Third clone connection argument */
     104        sysarg_t arg3;
     105
     106        /** Exchange mutex */
     107        fibril_mutex_t mutex;
     108
     109        /** Number of opened exchanges */
     110        atomic_t refcnt;
     111
     112        /** Mutex for stateful connections */
     113        fibril_mutex_t remote_state_mtx;
     114
     115        /** Data for stateful connections */
     116        void *remote_state_data;
     117};
     118
     119/** Exchange data */
     120struct async_exch {
     121        /** Link into list of inactive exchanges */
     122        link_t sess_link;
     123
     124        /** Link into global list of inactive exchanges */
     125        link_t global_link;
     126
     127        /** Session pointer */
     128        async_sess_t *sess;
     129
     130        /** Exchange identification */
     131        cap_phone_handle_t phone;
     132};
     133
    83134extern void awaiter_initialize(awaiter_t *);
    84135
    85 extern void __async_init(void);
     136extern void __async_server_init(void);
     137extern void __async_client_init(void);
     138extern void __async_ports_init(void);
    86139extern void async_insert_timeout(awaiter_t *);
    87 extern void reply_received(void *, errno_t, ipc_call_t *);
     140
     141extern errno_t async_create_port_internal(iface_t, async_port_handler_t,
     142    void *, port_id_t *);
     143extern async_port_handler_t async_get_port_handler(iface_t, port_id_t, void **);
    88144
    89145#endif
Note: See TracChangeset for help on using the changeset viewer.