[Prev][Next][Index][Thread]

Variable sizes and efficiency...




-----BEGIN PGP SIGNED MESSAGE-----

One other only tangentially oskit-related question, if I might gather
an expert opinion...

For simplicity of access for the user, I was planning to use separate
process IDs (unique across the system), and thread IDs (unique across
an individual process), so that the exception-handling thread of a
given process would always be 0 and the working threads 1 and
up. Then, to generate a system-wide unique thread-id for internal
kernel use, I'd simply concatenate the two together, something like:

typedef union utid_u
{
  longtype utid ;
  struct
  {
    shorttype pid ;
    shorttype tid ;
  } pt ;
} utid ;

Now, I'm developing on the x86, of course, on which I've heard that
the (16-bit) short is a most horribly inefficient size to use; but the
(64-bit) long long (gcc) presumably isn't all that much better and
could well be worse.

If I go along with this model, does anyone have any pressing reason
why I should go along with two longs making a longlong, as opposed to
two shorts making a long? I'm more inclined towards the former at
present, but...

Thanks,

Alistair

- -- 
Computational Thaumaturge, Deus Machinarum. -- Cerebrate of the Silicon Swarm.
e-mail: avatar-sig@arkane.demon.co.uk      WWW: http://www.arkane.demon.co.uk/
"I prefer to think of 'fax' as a shortening of 'fac simile sed longe', a Latin
 command meaning, 'make it the same, only far away.'" -- Ed Hopkins

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.5.1, an Emacs/PGP interface

iQCVAgUBNtr9pjxrXHNqerOZAQHLjwP+IGJNZqjvcuAb41NO480mETesRSUc7Q4d
P3oA00GNdS+RgSTFtkvOtqairKudAbgUuRvLjIIhe1rTE048Db+ZJQR+CqfwBEgr
3dduMYXsXhUyJ7mtKEWxAXZXAxdkqknWjRqshHaRdDjEb/RpRzRAMoxe0y0GzQ4C
WA3XKzk+shE=
=rqut
-----END PGP SIGNATURE-----
=================================
To subscribe or unsubscribe, send mail with "subscribe" or "unsubscribe"
to oskit-users-request@flux.cs.utah.edu.  The oskit-announce list is low
volume - if you want to subscribe, mail oskit-announce-request@flux.cs.utah.edu