All the GPIO ISR inputs to the interrupt controller are aggragated.
So best practice is to set a flag in GPIO interrupt, and exit to process in main().
Note a read of the register that records interrupts, int_clrx, will tell you which
GPIO were set.
I recommend reading the TRM for your part to get a handle on how PSOC interrupts
Since all enabled GPIOs use the same interrupt it is evident to read the states of all engaged pins and exit the ISR as soon as possible because no other GPIO-interrupt can be handled during that time.
Have a look here as well http://www.cypress.com/?id=4&rID=33781 it states that there exists no register to read the interrupting pin from.
I stand corrected, reading the int_clrx register only tells you if a GPIO pin
interrupt was posted, not what pin did it. Bob is correct, you have to read
pins to tell what pin interrupted. Further looks like you would have to keep
track of the state of ISR serving for a pin, eg. a flag/pin so that you do not
service a non-interrupting pin from one that is.
Also read the section in TRM, "Posted versus Pending Interrupts".