Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static void scc_perform_callbacks ( void   )  [static]

Perform callbacks registered by scc_monitor_security_failure().

Make sure callbacks only happen once... Since there may be some reason why the interrupt isn't generated, this routine could be called from base(task) level.

One at a time, go through scc_callbacks[] and call any non-null pointers.

Definition at line 1034 of file scc2_driver.c.

References os_lock_save_context, os_unlock_restore_context, SCC_CALLBACK_SIZE, scc_callbacks, and scc_callbacks_lock.

      static int callbacks_performed = 0;
      unsigned long irq_flags;      /* for IRQ save/restore */
      int i;

      /* Acquire lock of callbacks table and callbacks_performed flag */
      os_lock_save_context(scc_callbacks_lock, irq_flags);

      if (!callbacks_performed) {
            callbacks_performed = 1;

            /* Loop over all of the entries in the table */
            for (i = 0; i < SCC_CALLBACK_SIZE; i++) {
                  /* If not null, ... */
                  if (scc_callbacks[i]) {
                        scc_callbacks[i] ();    /* invoke the callback routine */

      os_unlock_restore_context(scc_callbacks_lock, irq_flags);


Generated by  Doxygen 1.6.0   Back to index