Changeset 8b655705 in mainline for uspace/lib/c/include/ipc/devman.h


Ignore:
Timestamp:
2011-04-15T19:38:07Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9dd730d1
Parents:
6b9e85b (diff), b2fb47f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/devman.h

    r6b9e85b r8b655705  
    3030 * @{
    3131 */
    32  
     32
    3333#ifndef LIBC_IPC_DEVMAN_H_
    3434#define LIBC_IPC_DEVMAN_H_
    3535
     36#include <ipc/common.h>
    3637#include <adt/list.h>
    37 #include <ipc/ipc.h>
    38 #include <stdlib.h>
    39 #include <stdio.h>
    40 #include <str.h>
     38#include <malloc.h>
     39#include <mem.h>
    4140
    42 #define DEVMAN_NAME_MAXLEN 256
     41#define DEVMAN_NAME_MAXLEN  256
    4342
    4443typedef sysarg_t devman_handle_t;
     44
     45typedef enum {
     46        /** Invalid value for debugging purposes */
     47        fun_invalid = 0,
     48        /** Function to which child devices attach */
     49        fun_inner,
     50        /** Fuction exported to external clients (leaf function) */
     51        fun_exposed
     52} fun_type_t;
    4553
    4654/** Ids of device models used for device-to-driver matching.
     
    6775} match_id_list_t;
    6876
    69 
    70 static inline match_id_t * create_match_id()
     77static inline match_id_t *create_match_id(void)
    7178{
    7279        match_id_t *id = malloc(sizeof(match_id_t));
     
    8592}
    8693
    87 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 
     94static inline void add_match_id(match_id_list_t *ids, match_id_t *id)
    8895{
    8996        match_id_t *mid = NULL;
    90         link_t *link = ids->ids.next;   
     97        link_t *link = ids->ids.next;
    9198       
    9299        while (link != &ids->ids) {
     
    98105        }
    99106       
    100         list_insert_before(&id->link, link);   
     107        list_insert_before(&id->link, link);
    101108}
    102109
     
    129136typedef enum {
    130137        DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
    131         DEVMAN_ADD_CHILD_DEVICE,
     138        DEVMAN_ADD_FUNCTION,
    132139        DEVMAN_ADD_MATCH_ID,
    133140        DEVMAN_ADD_DEVICE_TO_CLASS
     
    141148
    142149typedef enum {
    143         DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD
     150        DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD,
     151        DEVMAN_DEVICE_GET_HANDLE_BY_CLASS
    144152} client_to_devman_t;
    145153
Note: See TracChangeset for help on using the changeset viewer.