Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: HEADS UP: I will be merging christos-time_t by the end of theweek



dholland-current%netbsd.org@localhost said:
> What conclusions did we come to regarding PR 39215? I got behind on
> the discussion there at the time and haven't caught up on it yet. 

It has taken a while for me too to catch up -- I've just dug
out my old patches introducing devmajor_t/devminor_t and
built a -current kernel.
I'll append just the basic kernel patches, didn't look at
the rest yet. In any case there are no binary compatibility
issues.

> I think your(?) argument that minor numbers are used for array
> indexing and whatnot and shouldn't be bigger than machine words was
> fairly persuasive.

I had to notice that something leaked into device drivers which
shouldn't: Many drivers use macros like
#define XXXUNIT(dev) (minor(dev) & 0x0f)
This even lead to printf format changes to print out 64-bit
device unit numbers. With minor() returning an "int" as before
this wouldn't happen, and we'd avoid mixing types at other
places.

I'd say we should at least change major/minor to return ints
again. Whether new names are introduced is a matter of
taste, imo it helps clarity.

best regards
Matthias




-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index