Deleted Added
full compact
kern_sx.c (172416) kern_sx.c (173600)
1/*-
2 * Copyright (c) 2007 Attilio Rao <attilio@freebsd.org>
3 * Copyright (c) 2001 Jason Evans <jasone@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 26 unchanged lines hidden (view full) ---

35 * Priority propagation will not generally raise the priority of lock holders,
36 * so should not be relied upon in combination with sx locks.
37 */
38
39#include "opt_adaptive_sx.h"
40#include "opt_ddb.h"
41
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007 Attilio Rao <attilio@freebsd.org>
3 * Copyright (c) 2001 Jason Evans <jasone@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 26 unchanged lines hidden (view full) ---

35 * Priority propagation will not generally raise the priority of lock holders,
36 * so should not be relied upon in combination with sx locks.
37 */
38
39#include "opt_adaptive_sx.h"
40#include "opt_ddb.h"
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/kern/kern_sx.c 172416 2007-10-02 14:48:48Z pjd $");
43__FBSDID("$FreeBSD: head/sys/kern/kern_sx.c 173600 2007-11-14 06:21:24Z julian $");
44
45#include <sys/param.h>
46#include <sys/ktr.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/proc.h>
50#include <sys/sleepqueue.h>
51#include <sys/sx.h>

--- 929 unchanged lines hidden (view full) ---

981 else if (sx->sx_lock == SX_LOCK_DESTROYED) {
982 db_printf("DESTROYED\n");
983 return;
984 } else if (sx->sx_lock & SX_LOCK_SHARED)
985 db_printf("SLOCK: %ju\n", (uintmax_t)SX_SHARERS(sx->sx_lock));
986 else {
987 td = sx_xholder(sx);
988 db_printf("XLOCK: %p (tid %d, pid %d, \"%s\")\n", td,
44
45#include <sys/param.h>
46#include <sys/ktr.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/proc.h>
50#include <sys/sleepqueue.h>
51#include <sys/sx.h>

--- 929 unchanged lines hidden (view full) ---

981 else if (sx->sx_lock == SX_LOCK_DESTROYED) {
982 db_printf("DESTROYED\n");
983 return;
984 } else if (sx->sx_lock & SX_LOCK_SHARED)
985 db_printf("SLOCK: %ju\n", (uintmax_t)SX_SHARERS(sx->sx_lock));
986 else {
987 td = sx_xholder(sx);
988 db_printf("XLOCK: %p (tid %d, pid %d, \"%s\")\n", td,
989 td->td_tid, td->td_proc->p_pid, td->td_proc->p_comm);
989 td->td_tid, td->td_proc->p_pid, td->td_name);
990 if (sx_recursed(sx))
991 db_printf(" recursed: %d\n", sx->sx_recurse);
992 }
993
994 db_printf(" waiters: ");
995 switch(sx->sx_lock &
996 (SX_LOCK_SHARED_WAITERS | SX_LOCK_EXCLUSIVE_WAITERS)) {
997 case SX_LOCK_SHARED_WAITERS:

--- 44 unchanged lines hidden ---
990 if (sx_recursed(sx))
991 db_printf(" recursed: %d\n", sx->sx_recurse);
992 }
993
994 db_printf(" waiters: ");
995 switch(sx->sx_lock &
996 (SX_LOCK_SHARED_WAITERS | SX_LOCK_EXCLUSIVE_WAITERS)) {
997 case SX_LOCK_SHARED_WAITERS:

--- 44 unchanged lines hidden ---