Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#236329 - 03/10/2004 10:07 Solaris serial DCD interrupt
mdavey
enthusiast

Registered: 06/03/2003
Posts: 269
Loc: Wellingborough, UK
Hiya,

This is one for the Solaris SPARC programmers.

I want to call a handler routine whenever the DCD line on one of my serial ports changes status. In Linux I'd do something like this:

/* wait till a serial port status change interrupt is generated */
if (ioctl(fd, TIOCMIWAIT, TIOCM_CD)!=0) return -1;
// call handler here, which might do:
if (ioctl(fd, TIOCMGET, &arg)!=0) return -1;
return arg;

Now, clearly Solaris doesn't provide the same mechanism as Linux (TIOCMIWAIT isn't defined and neither man(1) and Google can't suggest an equivalent), so how would one do this in Solaris (other than eating CPU cycles by polling the line)?

[Edit: to clarify, I need to call some code every time there is a raising edge and every time there is a falling edge on this line]


Edited by mdavey (03/10/2004 11:45)

Top
#236330 - 03/10/2004 15:40 Re: Solaris serial DCD interrupt [Re: mdavey]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I don't know the answer to your question, as I'm a Solaris sysadmin and not programmer, but Celeste Stokely's Solaris Serial Port Resources Guide has always been able to answer my Solaris serial port questions before.
_________________________
Bitt Faulk

Top