WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: Error reporting capabilities for libxc

To: Gerd Hoffmann <kraxel@xxxxxxx>, Anthony Liguori <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Error reporting capabilities for libxc
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 24 Oct 2006 10:07:34 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Delivery-date: Tue, 24 Oct 2006 02:08:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <453DC4FC.7040902@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acb3S9exFiy4lWM/Edu3ngAX8io7RQ==
Thread-topic: [Xen-devel] Re: Error reporting capabilities for libxc
User-agent: Microsoft-Entourage/11.2.5.060620
On 24/10/06 08:47, "Gerd Hoffmann" <kraxel@xxxxxxx> wrote:

>> I know it's a bigger patch, but the Right Thing to do here is to just
>> propagate an error code through the libxc functions.
> 
> That doesn't allow a descriptive text message, which is often quite
> useful to figure what went wrong in detail.  error codes such as errno
> == EINVAL are not very helpful for trouble shooting ...
> 
> What number space we are talking about btw?  errno?  something else?

I think a separate numbering space, where each err number would have some
number of auxiliary arguments is being suggested, probably with an
xc_{get,set}_errnum() interface (since the 'errnum' would not be a simple
scalar so would be a bit of a pain to pass around). xc_{get,set}_errtext()
(or whatever it is called) could co-exist with this, so I am personally in
favour of the patch, at least as a starting point for further work. It
directly tackles our biggest current err-handling problem, which is stupidly
throwing away useful diagnostic info (or writing it to log files where it
gets hidden in with piles of other crap).

I guess using __thread is the best of a bad set of choices, by the way.
It'll limit us to gcc-3.3.x and later, which is fine. And we'll want to
build 32-bit with -mno-tls-direct-seg-refs. We can add that to CFLAGS for
all tools. I was wondering about explicitly stating that libxc is no
thread-safe for any given 'xc handle', but actually that is just storing up
bigger trouble.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel