lguest: clean up lguest_launcher.h
[safe/jmp/linux-2.6] / include / linux / mmzone.h
index bad9486..4c4522a 100644 (file)
@@ -344,12 +344,19 @@ struct zone {
 typedef enum {
        ZONE_ALL_UNRECLAIMABLE,         /* all pages pinned */
        ZONE_RECLAIM_LOCKED,            /* prevents concurrent reclaim */
+       ZONE_OOM_LOCKED,                /* zone is in OOM killer zonelist */
 } zone_flags_t;
 
 static inline void zone_set_flag(struct zone *zone, zone_flags_t flag)
 {
        set_bit(flag, &zone->flags);
 }
+
+static inline int zone_test_and_set_flag(struct zone *zone, zone_flags_t flag)
+{
+       return test_and_set_bit(flag, &zone->flags);
+}
+
 static inline void zone_clear_flag(struct zone *zone, zone_flags_t flag)
 {
        clear_bit(flag, &zone->flags);
@@ -359,11 +366,17 @@ static inline int zone_is_all_unreclaimable(const struct zone *zone)
 {
        return test_bit(ZONE_ALL_UNRECLAIMABLE, &zone->flags);
 }
+
 static inline int zone_is_reclaim_locked(const struct zone *zone)
 {
        return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags);
 }
 
+static inline int zone_is_oom_locked(const struct zone *zone)
+{
+       return test_bit(ZONE_OOM_LOCKED, &zone->flags);
+}
+
 /*
  * The "priority" of VM scanning is how much of the queues we will scan in one
  * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the