Whamcloud - gitweb
LU-1617 build: skip generated files in .gitignore
[fs/lustre-release.git] / libcfs / include / libcfs / darwin / darwin-prim.h
index 2f1fc74..7bc7af3 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -16,8 +14,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -26,7 +24,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -204,7 +202,9 @@ extern task_t       kernel_task;
 
 #define CLONE_SIGNAL    (CLONE_SIGHAND | CLONE_THREAD)
 
-extern int cfs_kernel_thread(cfs_thread_t func, void *arg, int flag);
+#define CFS_DAEMON_FLAGS (CLONE_VM | CLONE_FILES)
+
+extern int cfs_create_thread(cfs_thread_t func, void *arg, unsigned long flag);
 
 
 /*
@@ -437,10 +437,6 @@ extern int is_suser(void);
 #define lock_kernel()                          do {} while(0)
 #define unlock_kernel()                                do {} while(0)
 
-#define CAP_SYS_BOOT                           0
-#define CAP_SYS_ADMIN                           1
-#define capable(a)                             ((a) == CAP_SYS_BOOT ? is_suser(): is_suser1())
-
 #define USERMODEHELPER(path, argv, envp)       (0)
 
 #define cfs_module(name, version, init, fini)                          \
@@ -476,7 +472,7 @@ struct __dummy_ ## name ## _struct {}
 #define inter_module_get(n)                    cfs_symbol_get(n)
 #define inter_module_put(n)                    cfs_symbol_put(n)
 
-static inline int request_module(char *name)
+static inline int request_module(const char *name, ...)
 {
        return (-EINVAL);
 }
@@ -495,9 +491,6 @@ static inline int request_module(char *name)
 #define MODULE_PARM(a, b)
 #define MODULE_PARM_DESC(a, b)
 
-#define KERNEL_VERSION(a,b,c) ((a)*100+(b)*10+c)
-#define LINUX_VERSION_CODE KERNEL_VERSION(2,5,0)
-
 #define NR_IRQS                                512
 #define in_interrupt()                 ml_at_interrupt_context()