mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-05 06:41:55 +03:00
fb30cd43b9
git-svn-id: svn://kolibrios.org@3120 a494cfbc-eb01-0410-851d-a64ba20cac60
25 lines
481 B
C
25 lines
481 B
C
|
|
#ifndef __HMM_H__
|
|
#define __HMM_H__
|
|
|
|
struct hmm
|
|
{
|
|
u32 *table;
|
|
u32 next;
|
|
u32 avail;
|
|
u32 count;
|
|
};
|
|
|
|
int init_hmm(struct hmm *mm, u32 count);
|
|
u32 alloc_handle(struct hmm *mm);
|
|
int free_handle(struct hmm *mm, u32 handle);
|
|
|
|
#define hmm_get_data(mm, handle) \
|
|
((mm)->table[(handle)-1])
|
|
|
|
#define hmm_set_data(mm, handle, val) \
|
|
((mm)->table[(handle)-1]) = (u32)(val)
|
|
|
|
|
|
#endif /* __HMM_H__ */
|