From owner-svn-src-projects@FreeBSD.ORG Sat Dec 15 11:44:05 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2D262B2; Sat, 15 Dec 2012 11:44:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0F18FC0C; Sat, 15 Dec 2012 11:44:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBFBi5pX053761; Sat, 15 Dec 2012 11:44:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBFBi5Tn053759; Sat, 15 Dec 2012 11:44:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201212151144.qBFBi5Tn053759@svn.freebsd.org> From: Alexander Motin Date: Sat, 15 Dec 2012 11:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244253 - in projects/calloutng/sys: kern sys X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 11:44:05 -0000 Author: mav Date: Sat Dec 15 11:44:04 2012 New Revision: 244253 URL: http://svnweb.freebsd.org/changeset/base/244253 Log: Add msleep_spin_flags() KPI. Modified: projects/calloutng/sys/kern/kern_synch.c projects/calloutng/sys/sys/systm.h Modified: projects/calloutng/sys/kern/kern_synch.c ============================================================================== --- projects/calloutng/sys/kern/kern_synch.c Sat Dec 15 10:56:16 2012 (r244252) +++ projects/calloutng/sys/kern/kern_synch.c Sat Dec 15 11:44:04 2012 (r244253) @@ -266,7 +266,8 @@ _sleep(void *ident, struct lock_object * } int -msleep_spin(void *ident, struct mtx *mtx, const char *wmesg, int timo) +msleep_spin_flags(void *ident, struct mtx *mtx, const char *wmesg, int timo, + int flags) { struct thread *td; struct proc *p; @@ -305,7 +306,7 @@ msleep_spin(void *ident, struct mtx *mtx */ sleepq_add(ident, &mtx->lock_object, wmesg, SLEEPQ_SLEEP, 0); if (timo) - sleepq_set_timeout(ident, timo); + sleepq_set_timeout_flags(ident, timo, flags); /* * Can't call ktrace with any spin locks held so it can lock the Modified: projects/calloutng/sys/sys/systm.h ============================================================================== --- projects/calloutng/sys/sys/systm.h Sat Dec 15 10:56:16 2012 (r244252) +++ projects/calloutng/sys/sys/systm.h Sat Dec 15 11:44:04 2012 (r244253) @@ -356,8 +356,10 @@ int _sleep(void *chan, struct lock_objec #define msleep_bt(chan, mtx, pri, wmesg, bt, pr) \ _sleep((chan), &(mtx)->lock_object, (pri), (wmesg) 0, (bt), \ (pr), 0) -int msleep_spin(void *chan, struct mtx *mtx, const char *wmesg, int timo) - __nonnull(1); +int msleep_spin_flags(void *chan, struct mtx *mtx, const char *wmesg, + int timo, int flags) __nonnull(1); +#define msleep_spin(chan, mtx, wmesg, timo) \ + msleep_spin_flags((chan), (mtx), (wmesg), (timo), 0) int pause(const char *wmesg, int timo); #define tsleep(chan, pri, wmesg, timo) \ _sleep((chan), NULL, (pri), (wmesg), (timo), NULL, NULL, 0)