home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:3844 comp.unix.programmer:4572 comp.unix.internals:1776
- Newsgroups: comp.unix.wizards,comp.unix.programmer,comp.unix.internals
- Path: sparky!uunet!gumby!destroyer!ncar!noao!rstevens
- From: rstevens@noao.edu (W. Richard Stevens)
- Subject: Re: Implementation of Sys V. based message queues
- Message-ID: <1992Sep8.202405.24405@noao.edu>
- Sender: news@noao.edu
- Nntp-Posting-Host: gemini.tuc.noao.edu
- Organization: National Optical Astronomy Observatories, Tucson, AZ, USA
- References: <acourtny.715558246@unix1.tcd.ie> <1992Sep3.232807.18181@noao.edu> <1992Sep8.171014.21414@dickens.com>
- Date: Tue, 8 Sep 1992 20:24:05 GMT
- Lines: 37
-
- >> [ complaints of mine about AIX's select that also selects on
- >> messages queues ... ]
- >
- >Why? Is the implementation so awful? I remember I almost barfed too but
- >just because it was a new, strange select() that wasn't what I was used
- >to see.
- >
- >Anyway, I'm not trying to say that it's a great implementation, that
- >I don't know now, I just want to hear why it's bad.
- >
- >At least they did something ...
-
- OK, here are my complaints. First a disclaimer: I've never used AIX,
- I've just seen the man page for their select for the RS/6000.
-
- They use the same name (select) for a function that's been used for
- 10+ years with different arguments. Never use the same name for a
- different function, even if it does similar things. They should have
- defined a new function (selectq ?) with new arguments to handle message
- queues. They should have also kept the first 5 arguments to this new
- function identical to the existing select.
-
- Next, they changed the first argument so that the high-order 16-bits
- are for one thing and the low-order for something else. Yuck. If you
- have to specify two counts (# of descriptors and # of message queues)
- then use 2 arguments!
-
- Next, the middle three arguments aren't pointers to fd_set variables,
- they're pointers to an array of struct sellist.
-
- My bottom line is that it appears that I would have to take every
- program using select that doesn't give a hoot about System V message
- queues and recode the selects to conform to this new interface. Yuck.
- (Maybe they have some #defined constant that brings in the BSD-style
- select--I just don't know.)
-
- Rich Stevens (rstevens@nooa.edu)
-