composite icon indicating copy to clipboard operation
composite copied to clipboard

Callbacks for AEP threads

Open phanikishoreg opened this issue 6 years ago • 0 comments

AEP threads are those that have a rcvcap to wait on an event sent either by an interrupt or from other subsystem. Typical code construction of an AEP thread is:

void
aep_fn(arcvcap rcv, void *data)
{
      while (1) {
            int pending = cos_rcv(rcv, ...);
 
            //do work
       }
}

This is very much required to be followed for correct working of receiving events. Instead of making this a requirement for user-level code, we could design the AEPs such a way that, on even arrival, we make call-backs to the user code and user is free to write the call backs however they'd like. In the backend, we follow our cos_rcv calling conventions. This would require that the AEP creation change to use "call back function" and pass data along, which would be very much similar to the API we have now.

phanikishoreg avatar Mar 18 '18 00:03 phanikishoreg