[En-Nut-Discussion] Event API

Harald Kipp harald.kipp at egnite.de
Wed Oct 27 10:02:00 CEST 2004


>
>NutEventInit/Reset/Clear:
>
>NutEnterCritical()
>theEvent = 0
>NutExitCritical()

Matthias' post let me think about NutEventBroadcast().
Do we need a critical section in the SIGNALED case?
I assume, we don't, but I'm not sure.

int NutEventBroadcast(HANDLE * qhp)
{
     int rc = 0;

     if (*qhp == SIGNALED) { <---- UNPROTECTED
         *qhp = 0;           <---- UNPROTECTED
     else
         while (*qhp)
             rc += NutEventPost(qhp);

     return rc;
}

Harald




More information about the En-Nut-Discussion mailing list