Handle interrupts for GPIO

I need know, how add interrupt handle to gpio pin.

what OS are you using?