From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 16:28:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BCFD16A4CE for ; Wed, 10 Nov 2004 16:28:33 +0000 (GMT) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95C8743D1D for ; Wed, 10 Nov 2004 16:28:28 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA07068; Wed, 10 Nov 2004 18:25:52 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <41924110.4000807@icyb.net.ua> Date: Wed, 10 Nov 2004 18:25:52 +0200 From: Andriy Gapon User-Agent: Mozilla Thunderbird 0.9 (X11/20041108) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gerarra@tin.it References: <41536AD50005DCD2@ims3a.cp.tin.it> In-Reply-To: <41536AD50005DCD2@ims3a.cp.tin.it> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 11 Nov 2004 13:04:49 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: syscall: td_retval and zero return value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 16:28:33 -0000 on 10.11.2004 16:00 gerarra@tin.it said the following: > The way the handler advice you about syscalls failing is setting (and not > clearing as you were saying) the carry bit in eflags register (about ia32). > A sort of errno (if you see in a C-coder view) value is set in eax (or, > alternatively, edx) to show the reason of failing. There's no way to know > where error code is set; you can just verify pratically. I was actually interested in the opposite situation - something is put into eax,edx, but carry bit is cleared. > You can find all these things on "Programmers handbook". Thank you for the great hint! "The FreeBSD Developer's Handbook" has all. -- Andriy Gapon