/[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 Revision 15 by trond, 2014-11-19T19:32:53Z
# Line 9  Line 9 
9    
10  #include <errno.h>  #include <errno.h>
11  #include <pthread.h>  #include <pthread.h>
12    #include <sched.h>
13  #include <signal.h>  #include <signal.h>
14  #include <stdbool.h>  #include <stdbool.h>
15  #include <stdio.h>  #include <stdio.h>
# Line 181  noreturn void *livstidsfange(void *arg) Line 182  noreturn void *livstidsfange(void *arg)
182      printf("livstidsfange %2zu låser opp mutex\n", i + 1);      printf("livstidsfange %2zu låser opp mutex\n", i + 1);
183      pthread_mutex_unlock(&mutex);      pthread_mutex_unlock(&mutex);
184      printf("livstidsfange %2zu har låst opp mutex\n", i + 1);      printf("livstidsfange %2zu har låst opp mutex\n", i + 1);
185    
186    #ifdef _POSIX_PRIORITY_SCHEDULING
187        sched_yield();
188    #endif
189    } // while    } // while
190  } // livstidsfange()  } // livstidsfange()
191    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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