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/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    r764d71e r79ae36dd  
    4242#include <ipc/char.h>
    4343#include <async.h>
     44#include <async_obsolete.h>
    4445#include <unistd.h>
    4546#include <stdio.h>
     
    4849#include <errno.h>
    4950#include <inttypes.h>
    50 
    5151#include "s3c24xx_uart.h"
     52
     53// FIXME: remove this header
     54#include <kernel/ipc/ipc_methods.h>
    5255
    5356#define NAME "s3c24ser"
     
    123126                callid = async_get_call(&call);
    124127                method = IPC_GET_IMETHOD(call);
    125                 switch (method) {
    126                 case IPC_M_PHONE_HUNGUP:
     128               
     129                if (!method) {
    127130                        /* The other side has hung up. */
    128131                        async_answer_0(callid, EOK);
    129132                        return;
     133                }
     134               
     135                switch (method) {
    130136                case IPC_M_CONNECT_TO_ME:
    131137                        printf(NAME ": creating callback connection\n");
     
    156162
    157163                if (uart->client_phone != -1) {
    158                         async_msg_1(uart->client_phone, CHAR_NOTIF_BYTE,
     164                        async_obsolete_msg_1(uart->client_phone, CHAR_NOTIF_BYTE,
    159165                            data);
    160166                }
Note: See TracChangeset for help on using the changeset viewer.