Jump to content

Immediate self-notification handling


Recommended Posts

I am using a FIFO in my design and in some cases I need to push back the slightly modified content to the FIFO.

 I understand that sending immediate self-notification  should be avoided. To do so, I modified the sample FIFO code as
 

     void write(FIFO_t* c) {
       if (num_elements == max)
         wait(FIFO_read_event);

       data[(first + num_elements) % max] = c;
       ++ num_elements;
//       wait(SCTIME_CLOCKTIME); // Avoid immediate notification
       FIFO_write_event.notify(SCTIME_CLOCKTIME);
     }

In the combination shown above,  I receive no warning. However, when I define the notification time by the wait() (now commented out)  and notify() brackets are empty, I receive the warning

Warning: (W536) immediate self-notification ignored as of IEEE 1666-2011:

My guess was that the two cases are equivalent. What is the difference? Maybe only the syntax is checked and not the time difference?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...