Whamcloud - gitweb
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h)
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs.h
index 34c36a3..8136fde 100644 (file)
@@ -161,9 +161,9 @@ void lc_watchdog_dumplog(pid_t pid, void *data);
 /*
  * libcfs pseudo device operations
  *
- * struct cfs_psdev_t and
- * cfs_psdev_register() and
- * cfs_psdev_deregister() are declared in
+ * struct struct miscdevice and
+ * misc_register() and
+ * misc_deregister() are declared in
  * libcfs/<os>/<os>-prim.h
  *
  * It's just draft now.
@@ -185,39 +185,6 @@ struct cfs_psdev_ops {
 };
 
 /*
- * Universal memory allocator API
- */
-enum cfs_alloc_flags {
-        /* allocation is not allowed to block */
-        CFS_ALLOC_ATOMIC = 0x1,
-        /* allocation is allowed to block */
-        CFS_ALLOC_WAIT   = 0x2,
-        /* allocation should return zeroed memory */
-        CFS_ALLOC_ZERO   = 0x4,
-        /* allocation is allowed to call file-system code to free/clean
-         * memory */
-        CFS_ALLOC_FS     = 0x8,
-        /* allocation is allowed to do io to free/clean memory */
-        CFS_ALLOC_IO     = 0x10,
-        /* don't report allocation failure to the console */
-        CFS_ALLOC_NOWARN = 0x20,
-        /* standard allocator flag combination */
-        CFS_ALLOC_STD    = CFS_ALLOC_FS | CFS_ALLOC_IO,
-        CFS_ALLOC_USER   = CFS_ALLOC_WAIT | CFS_ALLOC_FS | CFS_ALLOC_IO,
-       CFS_ALLOC_NOFS   = CFS_ALLOC_WAIT | CFS_ALLOC_IO,
-       CFS_ALLOC_KERNEL = CFS_ALLOC_WAIT | CFS_ALLOC_IO | CFS_ALLOC_FS,
-};
-
-/* flags for cfs_page_alloc() in addition to enum cfs_alloc_flags */
-enum cfs_alloc_page_flags {
-       /* allow to return page beyond KVM. It has to be mapped into KVM by
-        * cfs_kmap() and unmapped with cfs_kunmap(). */
-       CFS_ALLOC_HIGHMEM  = 0x40,
-       CFS_ALLOC_HIGHUSER = CFS_ALLOC_WAIT | CFS_ALLOC_FS | CFS_ALLOC_IO |
-                            CFS_ALLOC_HIGHMEM,
-};
-
-/*
  * Drop into debugger, if possible. Implementation is provided by platform.
  */
 
@@ -227,11 +194,11 @@ void cfs_enter_debugger(void);
  * Defined by platform
  */
 int unshare_fs_struct(void);
-cfs_sigset_t cfs_get_blocked_sigs(void);
-cfs_sigset_t cfs_block_allsigs(void);
-cfs_sigset_t cfs_block_sigs(unsigned long sigs);
-cfs_sigset_t cfs_block_sigsinv(unsigned long sigs);
-void cfs_restore_sigs(cfs_sigset_t);
+sigset_t cfs_get_blocked_sigs(void);
+sigset_t cfs_block_allsigs(void);
+sigset_t cfs_block_sigs(unsigned long sigs);
+sigset_t cfs_block_sigsinv(unsigned long sigs);
+void cfs_restore_sigs(sigset_t);
 int cfs_signal_pending(void);
 void cfs_clear_sigpending(void);
 
@@ -324,8 +291,6 @@ static inline void *__container_of(void *ptr, unsigned long shift)
 #define container_of0(ptr, type, member) \
         ((type *)__container_of((void *)(ptr), offsetof(type, member)))
 
-#define SET_BUT_UNUSED(a) do { } while(sizeof(a) - sizeof(a))
-
 #define _LIBCFS_H
 
 #endif /* _LIBCFS_H */