Subversion Repositories Kolibri OS

Rev

Rev 6082 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.  
  3. #ifndef __DDK_H__
  4. #define __DDK_H__
  5.  
  6. #include <linux/kernel.h>
  7. #include <linux/errno.h>
  8. #include <linux/spinlock.h>
  9. #include <linux/mutex.h>
  10. #include <linux/rwsem.h>
  11.  
  12. #define OS_BASE             0x80000000
  13.  
  14. #define PG_SW               0x003
  15. #define PG_UW               0x007
  16. #define PG_WRITEC           0x008
  17. #define PG_NOCACHE          0x018
  18. #define PG_SHARED           0x200
  19.  
  20. #define MANUAL_DESTROY      0x80000000
  21.  
  22. #define ENTER()   dbgprintf("enter %s\n",__FUNCTION__)
  23. #define LEAVE()   dbgprintf("leave %s\n",__FUNCTION__)
  24. #define FAIL()    dbgprintf("fail %s\n",__FUNCTION__)
  25. #define LINE()    dbgprintf("%s line %d\n", __FUNCTION__,__LINE__)
  26.  
  27. typedef struct
  28. {
  29.   u32      handle;
  30.   u32      io_code;
  31.   void       *input;
  32.   int        inp_size;
  33.   void       *output;
  34.   int        out_size;
  35. }ioctl_t;
  36.  
  37. typedef int ( __stdcall *srv_proc_t)(ioctl_t *);
  38.  
  39. #define ERR_OK       0
  40. #define ERR_PARAM   -1
  41.  
  42.  
  43. struct ddk_params;
  44.  
  45. int   ddk_init(struct ddk_params *params);
  46.  
  47. u32 drvEntry(int, char *)__asm__("_drvEntry");
  48.  
  49.  
  50. #endif      /*    DDK_H    */
  51.