[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: video mem access with oskit-mach
From: |
Thomas Bushnell, BSG |
Subject: |
Re: video mem access with oskit-mach |
Date: |
03 Oct 2001 15:08:53 -0700 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:
> MiG doesn't know unsigned short, so I am afraid that I have to use int.
> The conversion from signed shorts to unsigned shorts is implementation
> defined (or can raise a signal even), so I am out of luck here (unless we
> forbid ports higher than 7fff).
unsigned short is just short with a ctype of "u_short" instead
of "short". Note <mach/std_types.defs>, which does the following for
32-bit ints:
type int = MACH_MSG_TYPE_INTEGER_32;
type unsigned = MACH_MSG_TYPE_INTEGER_32;
These are, as far as MiG cares, entirely identical; the difference is
the type that gets written in the prototypes for the stubs.
So you can just create
type unsigned16 = MACH_MSG_TYPE_INTEGER_16;
Then you'd have to add unsigned16 to the appropriate .h header.
Or you can do:
type u_short = MACH_MSG_TYPE_INTEGER_16;
And then you are done, because u_short is already in <sys/types.h>.
You could also do:
type unsigned16 = MACH_MSG_TYPE_INTEGER_16 ctype: u_short;
in which case the type has a different name between MiG and C.
> I slowly realize what's involved with kernel side servers. There
> are quite a few differences. For example, it seems variable size
> length arguments must be either always in-line (array [*:MAX]) or
> always out-of-line (^array []).
Yes, I believe this is correct. It would be nice to extend the
variable version to kernel side servers too, however.
- Re: video mem access with oskit-mach, (continued)
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/07
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/02
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/02
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/03
- Re: video mem access with oskit-mach, Roland McGrath, 2001/10/03
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/03
- Re: video mem access with oskit-mach, Roland McGrath, 2001/10/03
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/03
- Re: video mem access with oskit-mach, Roland McGrath, 2001/10/03
- Re: video mem access with oskit-mach, Roland McGrath, 2001/10/03
- Re: video mem access with oskit-mach,
Thomas Bushnell, BSG <=
- Re: video mem access with oskit-mach, Roland McGrath, 2001/10/03
- Re: video mem access with oskit-mach, Marcus Brinkmann, 2001/10/03
Re: keyboard access with oskit-mach, Roland McGrath, 2001/10/01