-/* -*- 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.
*/
/*
#define CFS_SYSFS_MODULE_PARM 0 /* no sysfs access to module parameters */
-#define cond_resched our_cond_resched
-void our_cond_resched();
-
#define LASSERT_SPIN_LOCKED(lock) do {} while(0)
#define LASSERT_SEM_LOCKED(sem) LASSERT(down_trylock(sem) != 0)
#define cfs_work_struct_t WORK_QUEUE_ITEM
-#define cfs_prepare_work(tq, routine, contex)
#define cfs_schedule_work(tq)
#define cfs_get_work_data(type,field,data) (data)
#define cfs_assert _ASSERT
+#ifndef get_cpu
+#define cfs_get_cpu() cfs_smp_processor_id()
+#define cfs_put_cpu() do { } while (0)
+#else
+#define cfs_get_cpu() get_cpu()
+#define cfs_put_cpu() put_cpu()
+#endif
+
#endif /* End of !__KERNEL__ */
/******************************************************************************/
#define LPU64 "%I64u"
#define LPD64 "%I64d"
#define LPX64 "%#I64x"
-#define LPSZ "%lu"
-#define LPSSZ "%ld"
+#define LPO64 "%#I64o"
/*
* long_ptr_t & ulong_ptr_t, same to "long" for linux