Whamcloud - gitweb
LU-3963 cleanup: C89 and build cleanups
[fs/lustre-release.git] / libcfs / include / libcfs / posix / posix-wordsize.h
index e191530..b7ef6e2 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.
  * 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.
+ *
+ * Copyright (c) 2011, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -43,8 +43,6 @@
 #ifndef __LIBCFS_LINUX_KP30_H__
 #define __LIBCFS_LINUX_KP30_H__
 
-
-
 #if defined(__CYGWIN__)
 # include <cygwin-ioctl.h>
 #endif
@@ -56,9 +54,8 @@
 #endif
 
 # define CFS_MODULE_PARM(name, t, type, perm, desc)
-#define PORTAL_SYMBOL_GET(x) inter_module_get(#x)
-#define PORTAL_SYMBOL_PUT(x) inter_module_put(#x)
-
+#define symbol_get(x) inter_module_get(#x)
+#define symbol_put(x) inter_module_put(#x)
 
 #ifdef __CYGWIN__
 # ifndef BITS_PER_LONG
 #  define BITS_PER_LONG __WORDSIZE
 #endif
 
-
-/******************************************************************************/
-/* Light-weight trace
- * Support for temporary event tracing with minimal Heisenberg effect. */
-#define LWT_SUPPORT  0
-
-#define LWT_MEMORY   (16<<20)
-
-typedef struct {
-        long long   lwte_when;
-        char       *lwte_where;
-        void       *lwte_task;
-        long        lwte_p1;
-        long        lwte_p2;
-        long        lwte_p3;
-        long        lwte_p4;
-# if BITS_PER_LONG > 32
-        long        lwte_pad;
-# endif
-} lwt_event_t;
-
-#if LWT_SUPPORT
-#define LWT_EVENT(p1,p2,p3,p4)     /* no userland implementation yet */
-#endif /* LWT_SUPPORT */
-
-/* ------------------------------------------------------------------ */
-
 #define IOCTL_LIBCFS_TYPE long
 
-
 #if BITS_PER_LONG > 32
 # define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
 # define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
@@ -112,28 +81,12 @@ typedef struct {
 # define LP_POISON ((void *)(long)0x5a5a5a5a)
 #endif
 
-#if (defined(__KERNEL__) && defined(HAVE_KERN__U64_LONG_LONG)) || \
-    (!defined(__KERNEL__) && defined(HAVE_USER__U64_LONG_LONG))
-/* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
-# define LPU64 "%Lu"
-# define LPD64 "%Ld"
-# define LPX64 "%#Lx"
-# define LPF64 "L"
-#elif (BITS_PER_LONG == 32)
-# define LPU64 "%Lu"
-# define LPD64 "%Ld"
-# define LPX64 "%#Lx"
-# define LPF64 "L"
-#elif (BITS_PER_LONG == 64)
-# define LPU64 "%lu"
-# define LPD64 "%ld"
-# define LPX64 "%#lx"
-# define LPF64 "l"
-#endif
-
-#ifndef LPU64
-# error "No word size defined"
-#endif
+# define LPU64 "%llu"
+# define LPD64 "%lld"
+# define LPX64 "%#llx"
+# define LPX64i "%llx"
+# define LPO64 "%#llo"
+# define LPF64 "ll"
 
 /*
  * long_ptr_t & ulong_ptr_t, same to "long" for gcc