From owner-freebsd-arch Mon Mar 4 14:32:42 2002 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id F101C37B402 for ; Mon, 4 Mar 2002 14:32:37 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g24MWPLv017281 for ; Mon, 4 Mar 2002 23:32:25 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: arch@freebsd.org Subject: kernel process priority question... From: Poul-Henning Kamp Date: Mon, 04 Mar 2002 23:32:25 +0100 Message-ID: <17280.1015281145@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG What is the correct way to set a priority on a kernel thread ? Is it legal to simply set the value like this: curthread->td_base_pri = PRIBIO; Or should the detour around the rtprio stuff be used: struct rtprio rtp; rtp.prio = RTP_PRIO_MAX; rtp.type = RTP_PRIO_IDLE; mtx_lock_spin(&sched_lock); rtp_to_pri(&rtp, td->td_ksegrp); mtx_unlock_spin(&sched_lock); -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message