From owner-freebsd-emulation@FreeBSD.ORG Thu Jun 9 04:30:18 2005 Return-Path: X-Original-To: freebsd-emulation@hub.freebsd.org Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A59E16A41C for ; Thu, 9 Jun 2005 04:30:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 702A443D1F for ; Thu, 9 Jun 2005 04:30:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j594UI2L099078 for ; Thu, 9 Jun 2005 04:30:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j594UILr099075; Thu, 9 Jun 2005 04:30:18 GMT (envelope-from gnats) Date: Thu, 9 Jun 2005 04:30:18 GMT Message-Id: <200506090430.j594UILr099075@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/81951: [patch] linux emulation: getpriority() returns incorrect value X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2005 04:30:18 -0000 The following reply was made to PR kern/81951; it has been noted by GNATS. From: Andriy Gapon To: Maxim.Sobolev@portaone.com Cc: bug-followup@FreeBSD.org Subject: Re: kern/81951: [patch] linux emulation: getpriority() returns incorrect value Date: Thu, 09 Jun 2005 07:22:32 +0300 on 08.06.2005 23:49 Maxim Sobolev said the following: > Committed, thanks! > > I wonder if the setpriority(2) needs the same cure. Please clarify and > let me know. I'll keep the PR open till your reply. > Maxim, setpriority(2) is not affected, the reason for this assymetry is in Linux's convention for system calls - they return both result and errno in the same register, positive values are reserved for results of successful calls and negative are reserved for -errno for failed calls. Thus they can not return negative priority values in getpriority(2) and have to shift it to positive range. There is no problem, of course, with passing negative values from userland to kernel. Thank you for the commit! -- Andriy Gapon