/******************************************************************************* ** ** gckKERNEL_Notify ** ** This function iscalled by clients to notify the gckKERNEL object of an event. ** ** INPUT: ** ** gckKERNEL Kernel ** Pointer to an gckKERNEL object. ** ** gceNOTIFY Notification ** Notification event. ** ** gctBOOL Data ** Optional data for notification. ** ** OUTPUT: ** ** Nothing. */ gceSTATUS gckKERNEL_Notify( IN gckKERNEL Kernel, IN gceNOTIFY Notification, IN gctBOOL Data ) { gceSTATUS status; gcmkHEADER_ARG("Kernel=%p Notification=%d Data=%d", Kernel, Notification, Data); /* Verify the arguments. */ gcmkVERIFY_OBJECT(Kernel, gcvOBJ_KERNEL); /* Dispatch on notifcation. */ switch (Notification) { case gcvNOTIFY_INTERRUPT: /* Process interrupt. */ status = gckHARDWARE_Interrupt(Kernel->hardware, Data); break; #ifdef EMULATOR case gcvNOTIFY_COMMAND_QUEUE: // Unfreeze C-Model. ((GCHAL*) Kernel->context)->UnFreeze(); status = gcvSTATUS_OK; break; #endif default: /* Success. */ status = gcvSTATUS_OK; break; } /* Return the status. */ gcmkFOOTER(); return status; }
/******************************************************************************* ** ** gckKERNEL_Notify ** ** This function iscalled by clients to notify the gckKERNRL object of an event. ** ** INPUT: ** ** gckKERNEL Kernel ** Pointer to an gckKERNEL object. ** ** gceNOTIFY Notification ** Notification event. ** ** OUTPUT: ** ** Nothing. */ gceSTATUS gckKERNEL_Notify( IN gckKERNEL Kernel, IN gceNOTIFY Notification, IN gctBOOL Data ) { gceSTATUS status; gcmkHEADER_ARG("Kernel=%p Notification=%d Data=%d", Kernel, Notification, Data); /* Verify the arguments. */ gcmkVERIFY_OBJECT(Kernel, gcvOBJ_KERNEL); /* Dispatch on notifcation. */ switch (Notification) { case gcvNOTIFY_INTERRUPT: /* Process the interrupt. */ #if COMMAND_PROCESSOR_VERSION > 1 status = gckINTERRUPT_Notify(Kernel->interrupt, Data); #else status = gckHARDWARE_Interrupt(Kernel->hardware, Data); #endif break; default: status = gcvSTATUS_OK; break; } /* Success. */ gcmkFOOTER(); return status; }