title: Trouble understanding this function extern void _setvect1(int vector, _Interrupt1 void (*target)());
body: <p>I'm working on an embedded processor and having trouble getting interrupts to work in real life.  They work fine in simulation but that's another story.</p>
  
  <p>Anyway on this ARC processor you set the interrupt handler with this function _setvect1 that looks like this </p>
  
  <pre><code>extern void _setvect1(int vector, _Interrupt1 void (*target)());
  </code></pre>
  
  <p>I don't understand what the second part means and what it's looking for.  Is that a pointer to a function, I'm not used to seeing something like (*target)  I vaguely remember that () is a function?</p>
  
  <p>This is my isr</p>
  
  <pre><code>int volatile flag_sp3 = 0;
  _Interrupt1 _Save_all_regs void sp3_isr(void)
  {
      unsigned volatile long result;
      result = _lr(0x0A);//status maybe
      display_value(result);
      flag_sp3++;
  }
  </code></pre>
  
  <p>They call Interrupt1 and _Save_all_regs calling conventions, another thing I've not really run into before.   I am talking to their support but still trying to understand and work it out for myself.</p>