Ignore:
Timestamp:
2011-06-08T19:01:55Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0eff68e
Parents:
764d71e
Message:

new async framework with integrated exchange tracking

  • strict isolation between low-level IPC and high-level async framework with integrated exchange tracking
    • each IPC connection is represented by an async_sess_t structure
    • each IPC exchange is represented by an async_exch_t structure
    • exchange management is either based on atomic messages (EXCHANGE_ATOMIC), locking (EXCHANGE_SERIALIZE) or connection cloning (EXCHANGE_CLONE)
  • async_obsolete: temporary compatibility layer to keep old async clients working (several pieces of code are currently broken, but only non-essential functionality)
  • IPC_M_PHONE_HANGUP is now method no. 0 (for elegant boolean evaluation)
  • IPC_M_DEBUG_ALL has been renamed to IPC_M_DEBUG
  • IPC_M_PING has been removed (VFS protocol now has VFS_IN_PING)
  • console routines in libc have been rewritten for better abstraction
  • additional use for libc-private header files (FILE structure opaque to the client)
  • various cstyle changes (typos, indentation, missing externs in header files, improved comments, etc.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/pipes.h

    r764d71e r79ae36dd  
    4343#include <ddf/driver.h>
    4444#include <fibril_synch.h>
     45#include <async.h>
    4546
    4647/** Abstraction of a physical connection to the device.
     
    6263 *
    6364 * Locking order: if you want to lock both mutexes
    64  * (@c guard and @c hc_phone_mutex), lock @c guard first.
    65  * It is not necessary to lock @c guard if you want to lock @c hc_phone_mutex
     65 * (@c guard and @c hc_sess_mutex), lock @c guard first.
     66 * It is not necessary to lock @c guard if you want to lock @c hc_sess_mutex
    6667 * only.
    6768 */
     
    8586        size_t max_packet_size;
    8687
    87         /** Phone to the host controller.
    88          * Negative when no session is active.
    89          * It is an error to access this member without @c hc_phone_mutex
     88        /** Session to the host controller.
     89         * NULL when no session is active.
     90         * It is an error to access this member without @c hc_sess_mutex
    9091         * being locked.
    9192         * If call over the phone is to be made, it must be preceeded by
    9293         * call to pipe_add_ref() [internal libusb function].
    9394         */
    94         int hc_phone;
     95        async_sess_t *hc_sess;
    9596
    96         /** Guard for serialization of requests over the phone. */
    97         fibril_mutex_t hc_phone_mutex;
     97        /** Guard for serialization of requests over the session. */
     98        fibril_mutex_t hc_sess_mutex;
    9899
    99100        /** Number of active transfers over the pipe. */
Note: See TracChangeset for help on using the changeset viewer.