[BACK]Return to kern_mutex.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/kern_mutex.c between version 1.64 and 1.65

version 1.64, 2017/01/26 04:11:56 version 1.65, 2017/05/01 21:35:25
Line 75  __KERNEL_RCSID(0, "$NetBSD$");
Line 75  __KERNEL_RCSID(0, "$NetBSD$");
 #define MUTEX_WANTLOCK(mtx)                                     \  #define MUTEX_WANTLOCK(mtx)                                     \
     LOCKDEBUG_WANTLOCK(MUTEX_DEBUG_P(mtx), (mtx),               \      LOCKDEBUG_WANTLOCK(MUTEX_DEBUG_P(mtx), (mtx),               \
         (uintptr_t)__builtin_return_address(0), 0)          (uintptr_t)__builtin_return_address(0), 0)
   #define MUTEX_TESTLOCK(mtx)                                     \
       LOCKDEBUG_WANTLOCK(MUTEX_DEBUG_P(mtx), (mtx),               \
           (uintptr_t)__builtin_return_address(0), -1)
 #define MUTEX_LOCKED(mtx)                                       \  #define MUTEX_LOCKED(mtx)                                       \
     LOCKDEBUG_LOCKED(MUTEX_DEBUG_P(mtx), (mtx), NULL,           \      LOCKDEBUG_LOCKED(MUTEX_DEBUG_P(mtx), (mtx), NULL,           \
         (uintptr_t)__builtin_return_address(0), 0)          (uintptr_t)__builtin_return_address(0), 0)
Line 831  mutex_owner(kmutex_t *mtx)
Line 834  mutex_owner(kmutex_t *mtx)
 }  }
   
 /*  /*
    * mutex_ownable:
    *
    *      When compiled with DEBUG and LOCKDEBUG defined, ensure that
    *      the mutex is available.  We cannot use !mutex_owned() since
    *      that won't work correctly for spin mutexes.
    */
   int
   mutex_ownable(kmutex_t *mtx)
   {
   
   #ifdef LOCKDEBUG
           MUTEX_TESTLOCK(mtx);
   #endif
           return 1;
   }
   
   /*
  * mutex_tryenter:   * mutex_tryenter:
  *   *
  *      Try to acquire the mutex; return non-zero if we did.   *      Try to acquire the mutex; return non-zero if we did.

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

CVSweb <webmaster@jp.NetBSD.org>