Whamcloud - gitweb
LU-9859 libcfs: remove prng
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs.h
index 99dc942..fce57ad 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <libcfs/linux/linux-misc.h>
 #include <libcfs/linux/linux-time.h>
+#include <libcfs/linux/linux-wait.h>
 
 #include <uapi/linux/lnet/libcfs_ioctl.h>
 #include <libcfs/libcfs_debug.h>
 # endif /* !__CHECKER__ */
 #endif /* !__must_hold */
 
+#ifdef HAVE_TOTALRAM_PAGES_AS_FUNC
+ #ifndef cfs_totalram_pages
+  #define cfs_totalram_pages() totalram_pages()
+ #endif
+#else
+ #ifndef cfs_totalram_pages
+  #define cfs_totalram_pages() totalram_pages
+ #endif
+#endif
+
 /* need both kernel and user-land acceptor */
 #define LNET_ACCEPTOR_MIN_RESERVED_PORT    512
 #define LNET_ACCEPTOR_MAX_RESERVED_PORT    1023
@@ -89,16 +100,6 @@ sigset_t cfs_block_sigsinv(unsigned long sigs);
 void cfs_restore_sigs(sigset_t);
 void cfs_clear_sigpending(void);
 
-/*
- * Random number handling
- */
-
-/* returns a random 32-bit integer */
-unsigned int cfs_rand(void);
-/* seed the generator */
-void cfs_srand(unsigned int, unsigned int);
-void cfs_get_random_bytes(void *buf, int size);
-
 int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
 int libcfs_ioctl(unsigned long cmd, void __user *uparam);
 
@@ -121,8 +122,8 @@ struct lnet_debugfs_symlink_def {
        const char *target;
 };
 
-void lnet_insert_debugfs(struct ctl_table *table,
-                        const struct lnet_debugfs_symlink_def *symlinks);
+void lnet_insert_debugfs(struct ctl_table *table);
+void lnet_remove_debugfs(struct ctl_table *table);
 
 /* helper for sysctl handlers */
 int lprocfs_call_handler(void *data, int write, loff_t *ppos,