lkml.org 
[lkml]   [2008]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 0/6] RFC: Typesafe callbacks
Date
On Tuesday 22 January 2008 10:57:03 Linus Torvalds wrote:
> On Tue, 22 Jan 2008, Rusty Russell wrote:
> > Attempt to create callbacks which take unsigned long as well as
> > correct pointer types.
>
> I bow down before you.
>
> I thought I had done some rather horrible things with gcc built-ins and
> macros, but I hereby hand over my crown to you.
>
> As my daughter would say: that patch fell out of the ugly tree, and hit
> every branch on the way down. Very impressive.
>
> All hail Rusty, undisputed ruler of Ugly-land.

Err, thanks. I read some old SCSI drivers and felt inspired...

> Side note: can you verify that __builtin_choose_expr() exists in gcc-3? I
> don't think we've relied on it before except on arm, and that one has
> always had its own compiler version dependencies..

Hmm, looks like not in 3.0.4, is in 3.1.1. I'll make it appropriately
#ifdef'ed (which as a bonus will make things that little bit uglier still...)

If we can stomach it the effect is nice, but the version which simply
allows pointer correctness (rather than trying to do unsigned long too) is
less bletcherous.

Thanks,
Rusty.


\
 
 \ /
  Last update: 2008-01-22 08:19    [W:0.065 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site