From owner-svn-src-head@FreeBSD.ORG Tue Oct 5 20:56:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E16BB106564A; Tue, 5 Oct 2010 20:56:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B74E58FC08; Tue, 5 Oct 2010 20:56:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o95Ku855071332; Tue, 5 Oct 2010 20:56:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o95Ku8Vw071330; Tue, 5 Oct 2010 20:56:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201010052056.o95Ku8Vw071330@svn.freebsd.org> From: Andrew Thompson Date: Tue, 5 Oct 2010 20:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213461 - head/sys/compat/ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2010 20:56:09 -0000 Author: thompsa Date: Tue Oct 5 20:56:08 2010 New Revision: 213461 URL: http://svn.freebsd.org/changeset/base/213461 Log: Use the printf-like capability from kproc_create(). Submitted by: Paul B Mahol Modified: head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Tue Oct 5 20:39:36 2010 (r213460) +++ head/sys/compat/ndis/subr_ntoskrnl.c Tue Oct 5 20:56:08 2010 (r213461) @@ -274,7 +274,6 @@ ntoskrnl_libinit() kdpc_queue *kq; callout_entry *e; int i; - char name[64]; mtx_init(&ntoskrnl_dispatchlock, "ntoskrnl dispatch lock", MTX_NDIS_LOCK, MTX_DEF|MTX_RECURSE); @@ -321,9 +320,8 @@ ntoskrnl_libinit() #endif kq = kq_queues + i; kq->kq_cpu = i; - sprintf(name, "Windows DPC %d", i); error = kproc_create(ntoskrnl_dpc_thread, kq, &p, - RFHIGHPID, NDIS_KSTACK_PAGES, name); + RFHIGHPID, NDIS_KSTACK_PAGES, "Windows DPC %d", i); if (error) panic("failed to launch DPC thread"); } @@ -334,9 +332,8 @@ ntoskrnl_libinit() for (i = 0; i < WORKITEM_THREADS; i++) { kq = wq_queues + i; - sprintf(name, "Windows Workitem %d", i); error = kproc_create(ntoskrnl_workitem_thread, kq, &p, - RFHIGHPID, NDIS_KSTACK_PAGES, name); + RFHIGHPID, NDIS_KSTACK_PAGES, "Windows Workitem %d", i); if (error) panic("failed to launch workitem thread"); } @@ -3382,7 +3379,6 @@ PsCreateSystemThread(handle, reqaccess, void *thrctx; { int error; - char tname[128]; thread_context *tc; struct proc *p; @@ -3393,9 +3389,8 @@ PsCreateSystemThread(handle, reqaccess, tc->tc_thrctx = thrctx; tc->tc_thrfunc = thrfunc; - sprintf(tname, "windows kthread %d", ntoskrnl_kth); error = kproc_create(ntoskrnl_thrfunc, tc, &p, - RFHIGHPID, NDIS_KSTACK_PAGES, tname); + RFHIGHPID, NDIS_KSTACK_PAGES, "Windows Kthread %d", ntoskrnl_kth); if (error) { free(tc, M_TEMP);