pastebin - collaborative debugging tool
rovema.kpaste.net RSS


igb_avb: patch for Realtime systems which require Priority inheritence
Posted by Anonymous on Thu 12th Oct 2023 10:33
raw | new post
view followups (newest first): igb_avb: patch for Realtime systems which require Priority inheritence by Anonymous

  1. # igb_avb patch for Realtime systems which require Priority inheritence
  2. # based on https://github.com/Avnu/igb_avb.git
  3. diff --git a/lib/igb.c b/lib/igb.c
  4. index 00a3560..4a79e98 100644
  5. --- a/lib/igb.c
  6. +++ b/lib/igb.c
  7. @@ -2562,6 +2562,14 @@ static int igb_create_lock(struct adapter *adapter)
  8.  
  9.                 attr_allocated = true;
  10.  
  11. +#if ((_POSIX_THREAD_ROBUST_PRIO_INHERIT-0) < 200809L)
  12. +/* Protect against libc implementations which do not support this */
  13. +#error Priority inheritence not supported for robust mutexes with this pthread implementation
  14. +#endif
  15. +               // to be used for both inter-process and inter-thread synchronization
  16. +               if (pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT) != 0)
  17. +                       goto err;
  18. +
  19.                 // to be used for both inter-process and inter-thread synchronization
  20.                 if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED) != 0)
  21.                         goto err;

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at