serial interrupt with Arduino language

In Arduino language exist the instruction <attachInterrupt (N, Function, Mode)>.
This instruction refers only external interrupt on pin.
Question: Is there something similar to handle interrupts when a serial data is received from port RX?
I think that Serial.available () function is not an interrupt but a test function on the serial buffer. Is it true or not?

Is it true or not?

from the sources (windows 0.22) - C:\Program Files (x86)\arduino-0022\hardware\arduino\cores\arduino

int HardwareSerial::available(void) { return (unsigned int)(RX_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % RX_BUFFER_SIZE; }

so yes it is a test.

Question: Is there something similar to handle interrupts when a serial data is received from port RX?

You could patch the inline - store_char() function to tickle your own code, (all warnings apply! :) This function places a received char in the receive buffer. So you could intercept receiving serial com there. Be carefull not to make your routine too time consuming (not prints or delays)

DId not check the 1.0 details, that is left as homework ;)

Question: Is there something similar to handle interrupts when a serial data is received from port RX?

Why do you think you need to interrupt what your code is doing to react immediately when serial data arrives?

If processing serial data was more important, then you should restructure your code to check for the presence of serial data in the buffer more often.

There is a reason why there is a buffer.