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

Diff of /trunk/livstidsfanger.c

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

Revision 10 by trond, 2014-11-07T13:50:02Z Revision 11 by trond, 2014-11-08T11:56:59Z
# Line 66  noreturn int main(int argc, char **argv) Line 66  noreturn int main(int argc, char **argv)
66      printf("maintrĂ¥den oppretter livstidsfange %2zu\n", i + 1);      printf("maintrĂ¥den oppretter livstidsfange %2zu\n", i + 1);
67    
68      if ( (errno = pthread_create(&tid, NULL, livstidsfange, (void *)i)) != 0) {      if ( (errno = pthread_create(&tid, NULL, livstidsfange, (void *)i)) != 0) {
69          fflush(stdout);
70        fprintf(stderr,        fprintf(stderr,
71                "%s: pthread_create(&tid, NULL, livstidsfange, (void *)%2zu) = %s (%d)\n",                "%s: pthread_create(&tid, NULL, livstidsfange, (void *)%2zu) = %s (%d)\n",
72                argv[0], i, strerror(errno), errno);                argv[0], i, strerror(errno), errno);
73          fflush(stderr);
74        _exit(1);        _exit(1);
75      } // if      } // if
76    } // for    } // for
# Line 178  void visResultater(void) Line 180  void visResultater(void)
180    
181    fflush(stderr);    fflush(stderr);
182    fflush(stdout);    fflush(stdout);
183    fflush(stderr);  
   fflush(stdout);  
184    puts("\nResultater:\n");    puts("\nResultater:\n");
185    
186    printf("bryter %u er ved avslutning vippet %s\n", 1U, brytere[0] == true ? "opp" : "ned");    printf("bryter %u er ved avslutning vippet %s\n", 1U, brytere[0] == true ? "opp" : "ned");


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

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