Whamcloud - gitweb
LU-4199 libcfs: add CPU table functions for uniprocessor
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs_cpu.h
index d98a6fc..50aca83 100644 (file)
@@ -22,7 +22,7 @@
  */
 /*
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 
 #ifndef HAVE_LIBCFS_CPT
 
+#ifndef __KERNEL__
 typedef unsigned long          cpumask_t;
 typedef unsigned long          nodemask_t;
+#endif
 
 struct cfs_cpt_table {
        /* # of CPU partitions */
@@ -195,6 +197,11 @@ void cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt);
 int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt);
 
 /**
+ * return number of HTs in the same core of \a cpu
+ */
+int cfs_cpu_ht_nsiblings(int cpu);
+
+/**
  * iterate over all CPU partitions in \a cptab
  */
 #define cfs_cpt_for_each(i, cptab)     \