Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/tprof/tprof.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/tprof/tprof.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- src/sys/dev/tprof/tprof.c 2008/05/07 08:48:11 1.2 +++ src/sys/dev/tprof/tprof.c 2009/01/20 15:13:54 1.3 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof.c,v 1.2 2008/05/07 08:48:11 yamt Exp $ */ +/* $NetBSD: tprof.c,v 1.3 2009/01/20 15:13:54 yamt Exp $ */ /*- * Copyright (c)2008 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.2 2008/05/07 08:48:11 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.3 2009/01/20 15:13:54 yamt Exp $"); #include #include @@ -69,6 +69,12 @@ typedef struct { callout_t c_callout; } __aligned(CACHE_LINE_SIZE) tprof_cpu_t; +/* + * locking order: + * tprof_reader_lock -> tprof_lock + * tprof_startstop_lock -> tprof_lock + */ + static kmutex_t tprof_lock; static bool tprof_running; static u_int tprof_nworker;