add memobj_has_pager()

This commit is contained in:
NAKAMURA Gou
2014-07-03 12:06:29 +09:00
parent d59628e131
commit 9efb5e4fc5
3 changed files with 15 additions and 3 deletions

View File

@ -18,8 +18,15 @@
#include <ihk/lock.h>
#include <list.h>
enum {
/* for memobj.flags */
MF_HAS_PAGER = 0x0001,
};
struct memobj {
struct memobj_ops * ops;
uint32_t flags;
int8_t padding[4];
ihk_spinlock_t lock;
};
@ -74,6 +81,11 @@ static inline void memobj_unlock(struct memobj *obj)
ihk_mc_spinlock_unlock_noirq(&obj->lock);
}
static inline int memobj_has_pager(struct memobj *obj)
{
return !!(obj->flags & MF_HAS_PAGER);
}
int fileobj_create(int fd, struct memobj **objp, int *maxprotp);
#endif /* HEADER_MEMOBJ_H */