Re: possible typo in multithreading website
On Apr 13, 10:27 pm, Paavo Helde <pa...@nospam.please.ee> wrote:
Pete Becker <p...@versatilecoding.com> kirjutas:
On 2009-04-13 07:14:47 -0400, James Kanze <james.ka...@gmail.com> said:
For Windows, it should be:
DWORD WINAPI workerThread( __in LPVOID ) ;
(I'm not sure what all those macros mean: DWORD sounds like
a long long, WINAPI is probably some implementation
extension controling the linkage---the equivalent of
`extern "C"' in standard C++, and LPVOID a long pointer to
void, except that I didn't think that Windows supported
long (48 bit) pointers.)
Windows does, however, support long (32-bit) pointers.
LPVOID is a carryover from the olden days of 16-bit Windows,
when SPVOID (I think that's the name...) was a 16-bit
pointer. This kind of muddle is what happens when type names
encode implementation details and don't get properly
updated.
Likewise, DWORD is a leftover from 16-bit processor days,
where WORD (machine natural processing unit) was 16-bit, and
double word (DWORD) hence 32-bit. Never mind that the
processor word has meanwhile grown to 64-bit in common Windows
platforms.
Except that I know DWORD from back when the largest Intel
processor was 8 bits, and Microsoft only make language tools
(Basic, Fortran, etc.). It's standard IBM terminology (and thus
widespread): BYTE: 8 bits, HWORD (or half word): 16 bits, WORD:
32 bits, and DWORD: 64 bits. (But in this case, I think it's
Intel which first broke with tradition, and not Microsoft. The
8080 assembler only had bytes and words.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34