X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Flu_time.c;h=26513cf8bacc477d048dba44ae9462e61377c70c;hb=0c8f7070d6ab00493f0502b3d5fb5bb5d4d33695;hp=5a11f007918372cab5544d2ced52e6276f1b0f03;hpb=c079cd7484d5e7e656eae050003075e30f7f88cc;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/lu_time.c b/lustre/obdclass/lu_time.c index 5a11f00..26513cf 100644 --- a/lustre/obdclass/lu_time.c +++ b/lustre/obdclass/lu_time.c @@ -1,31 +1,45 @@ /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- * vim:expandtab:shiftwidth=8:tabstop=8: * - * Lustre Time Tracking. + * GPL HEADER START * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nikita Danilov + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. + * You should have received a copy of the GNU General Public License + * version 2 along with this program; If not, see + * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. * + * GPL HEADER END + */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Use is subject to license terms. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. + * + * lustre/obdclass/lu_time.c + * + * Lustre Time Tracking. * These are the only exported functions, they provide some generic - * infrastructure for managing object devices + * infrastructure for managing object devices. + * + * Author: Nikita Danilov */ #define DEBUG_SUBSYSTEM S_CLASS @@ -33,6 +47,7 @@ # define EXPORT_SYMTAB #endif +#include /* OBD_{ALLOC,FREE}_PTR() */ #include #include @@ -48,6 +63,7 @@ struct lu_time_data { unsigned long long ltd_timestamp[LU_TIME_DEPTH_MAX]; }; +/* context key constructor/destructor: lu_time_key_init, lu_time_key_fini */ LU_KEY_INIT_FINI(lu_time, struct lu_time_data); void lu_time_key_exit(const struct lu_context *ctx, @@ -145,7 +161,7 @@ unsigned long long lu_time_stamp_get(void) /* * Return timestamp with microsecond precision. This has to be cheap. */ -//#ifdef CONFIG_X86 +//#ifdef CONFIG_X86 #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) /* * do_gettimeofday() goes backwards sometimes :(. Usethe TSC