while(whatever == 0){
Yes, but you never change the value of whatever inside your loop. It's a local variable in that function, so no other function (including the interrupt) can change it.
This may be what you intended. But if you really want a while loop which never exits, just write while(true)