/[livstidsfanger]/trunk/livstidsfanger.c
ViewVC logotype

Diff of /trunk/livstidsfanger.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

  Revision 14 by trond, 2014-11-09T15:30:18Z
vs.
  Revision 15 by trond, 2014-11-19T19:32:53Z
*** trunk/livstidsfanger.c	2014/11/09 15:30:18	14
--- trunk/livstidsfanger.c	2014/11/19 19:32:53	15
***************
*** 9,14 ****
--- 9,15 ----
  
  #include <errno.h>
  #include <pthread.h>
+ #include <sched.h>
  #include <signal.h>
  #include <stdbool.h>
  #include <stdio.h>
***************
*** 181,186 ****
--- 182,191 ----
      printf("livstidsfange %2zu låser opp mutex\n", i + 1);
      pthread_mutex_unlock(&mutex);
      printf("livstidsfange %2zu har låst opp mutex\n", i + 1);
+ 
+ #ifdef _POSIX_PRIORITY_SCHEDULING
+     sched_yield();
+ #endif
    } // while
  } // livstidsfange()
  


 

svn@ximalas.info
ViewVC Help
Powered by ViewVC 1.3.0-beta1