Changeset 79ae36dd in mainline for uspace/drv/usbmouse/mouse.c


Ignore:
Timestamp:
2011-06-08T19:01:55Z (14 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/drv/usbmouse/mouse.c

    r764d71e r79ae36dd  
    3434 * Actual handling of USB mouse protocol.
    3535 */
    36 #include "mouse.h"
     36
    3737#include <usb/debug.h>
    3838#include <errno.h>
    3939#include <str_error.h>
    4040#include <ipc/mouse.h>
     41#include <async.h>
     42#include <async_obsolete.h>
     43#include "mouse.h"
    4144
    4245/** Mouse polling callback.
     
    8184                if ((shift_x != 0) || (shift_y != 0)) {
    8285                        /* FIXME: guessed for QEMU */
    83                         async_req_2_0(mouse->console_phone,
     86                        async_obsolete_req_2_0(mouse->console_phone,
    8487                            MEVENT_MOVE,
    8588                            - shift_x / 10,  - shift_y / 10);
     
    8790                if (butt) {
    8891                        /* FIXME: proper button clicking. */
    89                         async_req_2_0(mouse->console_phone,
     92                        async_obsolete_req_2_0(mouse->console_phone,
    9093                            MEVENT_BUTTON, 1, 1);
    91                         async_req_2_0(mouse->console_phone,
     94                        async_obsolete_req_2_0(mouse->console_phone,
    9295                            MEVENT_BUTTON, 1, 0);
    9396                }
     
    115118        usb_mouse_t *mouse = (usb_mouse_t *) arg;
    116119
    117         async_hangup(mouse->console_phone);
     120        async_obsolete_hangup(mouse->console_phone);
    118121        mouse->console_phone = -1;
    119122
Note: See TracChangeset for help on using the changeset viewer.