Heat oil in a pressure cooker and when hot,add the whole spices listed.Fry them until fragrant and then slide in the chopped ginger and garlic.Saute until the raw smell disappears.Add the sliced onions along with curry leaves and green chillies.Saute until the onion turns translucent.