]> err.no Git - linux-2.6/blobdiff - include/linux/sched.h
hugetlb: reserve huge pages for reliable MAP_PRIVATE hugetlbfs mappings until fork()
[linux-2.6] / include / linux / sched.h
index af443a08431fc271c2983aa3743709a812025e9a..6aca4a16e377633a1d2cde29fba627b086241b0a 100644 (file)
@@ -825,7 +825,16 @@ extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
                                    struct sched_domain_attr *dattr_new);
 extern int arch_reinit_sched_domains(void);
 
-#endif /* CONFIG_SMP */
+#else /* CONFIG_SMP */
+
+struct sched_domain_attr;
+
+static inline void
+partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
+                       struct sched_domain_attr *dattr_new)
+{
+}
+#endif /* !CONFIG_SMP */
 
 struct io_context;                     /* See blkdev.h */
 #define NGROUPS_SMALL          32
@@ -1974,6 +1983,13 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
 
 #endif
 
+static inline int object_is_on_stack(void *obj)
+{
+       void *stack = task_stack_page(current);
+
+       return (obj >= stack) && (obj < (stack + THREAD_SIZE));
+}
+
 extern void thread_info_cache_init(void);
 
 /* set thread flags in other task's structures