about tty device interrupt

I want to know how the tty device calls the slinput function(openBSD function) when a input comes on the serial line.Now a days I am using a "nock" function which polls the device.But I want to make it event based.So I want to know the interrupt that interrupts when a input comes on the serial line. Thanx.