Subversion Repositories Kolibri OS

Rev

Rev 8687 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8687 Rev 8699
Line 47... Line 47...
47
        unsigned char ctrl_key;
47
        unsigned char ctrl_key;
48
    };
48
    };
49
}ksys_oskey_t;
49
}ksys_oskey_t;
Line 50... Line 50...
50
 
50
 
51
typedef struct{
-
 
52
  unsigned     handle;
-
 
53
  unsigned     io_code;
-
 
54
  unsigned     *input;
-
 
55
  int          inp_size;
-
 
56
  void         *output;
-
 
57
  int          out_size;
-
 
58
}ksys_ioctl_t;
-
 
59
 
-
 
60
typedef struct{
51
typedef struct{
61
    void *data;
52
    void *data;
62
    size_t size;
53
    size_t size;
Line 150... Line 141...
150
typedef struct {
141
typedef struct {
151
    char* func_name;
142
    char* func_name;
152
    void* func_ptr;
143
    void* func_ptr;
153
}ksys_coff_etable_t;
144
}ksys_coff_etable_t;
Line -... Line 145...
-
 
145
 
-
 
146
typedef void* ksys_drv_hand_t;
-
 
147
 
-
 
148
typedef struct{
-
 
149
    ksys_drv_hand_t handler;
-
 
150
    unsigned func_num;
-
 
151
    void* in_data_ptr;
-
 
152
    unsigned in_data_size;
-
 
153
    void* out_data_ptr;
-
 
154
    unsigned out_data_size;
-
 
155
}ksys_drv_ctl_t;
154
 
156
 
Line 155... Line 157...
155
#pragma pack(pop)
157
#pragma pack(pop)
156
 
158
 
157
enum KSYS_EVENTS {
159
enum KSYS_EVENTS {
Line 997... Line 999...
997
        "int $0x40":
999
        "int $0x40":
998
        :"a"(68), "b"(23), "c"(shm_name)
1000
        :"a"(68), "b"(23), "c"(shm_name)
999
    );
1001
    );
1000
}
1002
}
Line -... Line 1003...
-
 
1003
 
-
 
1004
/* Driver functions */
-
 
1005
 
-
 
1006
static inline
-
 
1007
ksys_drv_hand_t _ksys_load_driver(char *driver_name)
-
 
1008
{
-
 
1009
    ksys_drv_hand_t driver_h;
-
 
1010
    asm_inline(
-
 
1011
        "int $0x40"
-
 
1012
        :"=a"(driver_h)
-
 
1013
        :"a"(68), "b"(16), "c"(driver_name)
-
 
1014
    );
-
 
1015
    return driver_h;
-
 
1016
}
-
 
1017
 
-
 
1018
static inline
-
 
1019
unsigned _ksys_work_driver(ksys_drv_ctl_t *ioctl)
-
 
1020
{
-
 
1021
    unsigned status;
-
 
1022
    asm_inline(
-
 
1023
        "int $0x40"
-
 
1024
        :"=a"(status)
-
 
1025
        :"a"(68), "b"(17), "c"(ioctl)
-
 
1026
        :"memory"
-
 
1027
    );
-
 
1028
    return status;
-
 
1029
}
1001
 
1030
 
1002
#ifdef __cplusplus
1031
#ifdef __cplusplus
1003
}
1032
}
Line 1004... Line 1033...
1004
#endif
1033
#endif