Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. #ifndef __HMM_H__
  3. #define __HMM_H__
  4.  
  5. struct hmm
  6. {
  7.     u32  *table;
  8.     u32   next;
  9.     u32   avail;
  10.     u32   count;
  11. };
  12.  
  13. int  init_hmm(struct hmm *mm, u32 count);
  14. u32  alloc_handle(struct hmm *mm);
  15. int  free_handle(struct hmm *mm, u32 handle);
  16.  
  17. #define hmm_get_data(mm, handle)                  \
  18.         ((mm)->table[(handle)-1])
  19.  
  20. #define hmm_set_data(mm, handle, val)             \
  21.         ((mm)->table[(handle)-1]) = (u32)(val)
  22.  
  23.  
  24. #endif /* __HMM_H__ */
  25.