hi,
I was wondering if there is a standard C typedef for the size of a register (eg. 32bit on x86 and 64bit on x86-64)? I mean, then I don't have to define my own types in my kernel...
thanks in advance
C library typedefs
Re:C library typedefs
No, there isn't.
intptr_t comes quite close (an integer type you can cast a pointer to and back from with no loss of information), but since it is possible for a platform to have different sizes for data and address registers, that needn't necessarily be the size of a data register...
intptr_t comes quite close (an integer type you can cast a pointer to and back from with no loss of information), but since it is possible for a platform to have different sizes for data and address registers, that needn't necessarily be the size of a data register...
Every good solution is obvious once you've found it.
Re:C library typedefs
*Stabs darkness*
My guess is that it is because C does not operate on registers. Indeed, the C program may be operating on a computer without registers (stupid, but possible none the less).
My guess is that it is because C does not operate on registers. Indeed, the C program may be operating on a computer without registers (stupid, but possible none the less).