Whamcloud - gitweb
removed some empty files (authors, news, readme)
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index 72d3b41..91a307a 100644 (file)
@@ -1,11 +1,7 @@
 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
  * vim:expandtab:shiftwidth=8:tabstop=8:
  *
- * api/api-ni.c
- * Network Interface code
- *
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
  *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
@@ -36,16 +32,16 @@ int ptl_init;
 static struct nal_t *ptl_nal_table[NAL_MAX_NR + 1];
 
 #ifdef __KERNEL__
-DECLARE_MUTEX(ptl_mutex);
+struct semaphore ptl_mutex;
 
 static void ptl_mutex_enter (void) 
 {
-        down (&ptl_mutex);
+        mutex_down (&ptl_mutex);
 }
 
 static void ptl_mutex_exit (void)
 {
-        up (&ptl_mutex);
+        mutex_up (&ptl_mutex);
 }
 #else
 static void ptl_mutex_enter (void)
@@ -165,7 +161,7 @@ void PtlFini(void)
                                 continue;
                         
                         if (nal->nal_refct != 0) {
-                                CWARN("NAL %d has outstanding refcount %d\n",
+                                CWARN("NAL %x has outstanding refcount %d\n",
                                       i, nal->nal_refct);
                                 nal->nal_ni_fini(nal);
                         }
@@ -212,11 +208,11 @@ int PtlNIInit(ptl_interface_t interface, ptl_pid_t requested_pid,
         nal->nal_handle.nal_idx = (NI_HANDLE_MAGIC & ~NI_HANDLE_MASK) | interface;
         nal->nal_handle.cookie = 0;
         
-        CDEBUG(D_OTHER, "Starting up NAL (%d) refs %d\n", interface, nal->nal_refct);
+        CDEBUG(D_OTHER, "Starting up NAL (%x) refs %d\n", interface, nal->nal_refct);
         rc = nal->nal_ni_init(nal, requested_pid, desired_limits, actual_limits);
 
         if (rc != PTL_OK) {
-                CERROR("Error %d starting up NAL %d, refs %d\n", rc,
+                CERROR("Error %d starting up NAL %x, refs %d\n", rc,
                        interface, nal->nal_refct);
                 GOTO(out, rc);
         }