Changeset 74017ce in mainline for uspace/lib/c


Ignore:
Timestamp:
2017-11-22T17:36:54Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a6065c
Parents:
c4c6025
git-author:
Jiri Svoboda <jiri@…> (2017-11-22 15:53:34)
git-committer:
Jiri Svoboda <jiri@…> (2017-11-22 17:36:54)
Message:

Convert char_dev_iface users to chardev.

Location:
uspace/lib/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/chardev_srv.c

    rc4c6025 r74017ce  
    169169                        break;
    170170                default:
    171                         async_answer_0(callid, EINVAL);
     171                        if (srv->srvs->ops->def_handler != NULL)
     172                                srv->srvs->ops->def_handler(srv, callid, &call);
     173                        else
     174                                async_answer_0(callid, ENOTSUP);
    172175                }
    173176        }
  • uspace/lib/c/include/io/chardev_srv.h

    rc4c6025 r74017ce  
    6161        int (*read)(chardev_srv_t *, void *, size_t, size_t *);
    6262        int (*write)(chardev_srv_t *, const void *, size_t, size_t *);
     63        void (*def_handler)(chardev_srv_t *, ipc_callid_t, ipc_call_t *);
    6364};
    6465
  • uspace/lib/c/include/ipc/chardev.h

    rc4c6025 r74017ce  
    4141typedef enum {
    4242        CHARDEV_READ = IPC_FIRST_USER_METHOD,
    43         CHARDEV_WRITE
     43        CHARDEV_WRITE,
    4444} chardev_request_t;
     45
     46enum {
     47        CHARDEV_LIMIT = CHARDEV_WRITE + 1
     48};
    4549
    4650#endif
  • uspace/lib/c/include/ipc/serial_ctl.h

    rc4c6025 r74017ce  
    3030#define LIBC_IPC_SERIAL_CTL_H_
    3131
    32 #include <ipc/dev_iface.h>
     32#include <ipc/chardev.h>
    3333
    3434/** IPC methods for getting/setting serial communication properties
     
    4141 */
    4242typedef enum {
    43         SERIAL_GET_COM_PROPS = DEV_FIRST_CUSTOM_METHOD,
     43        SERIAL_GET_COM_PROPS = CHARDEV_LIMIT,
    4444        SERIAL_SET_COM_PROPS
    4545} serial_ctl_t;
Note: See TracChangeset for help on using the changeset viewer.