| 1 |
// Programmet bruker ISO C 2011 (ISO/IEC 9899:2011) og Pthreads (IEEE Std 1003.1c-1995). -*- coding: utf-8 -*- |
// Programmet bruker ISO C 2011 (ISO/IEC 9899:2011) og Pthreads (IEEE Std 1003.1c-2001). -*- coding: utf-8 -*- |
| 2 |
// Løsning programmert av Trond Endrestøl <Trond.Endrestol@ximalas.info>, 2014-11-06. |
// Løsning programmert av Trond Endrestøl <Trond.Endrestol@ximalas.info>, 2014-11-06. |
| 3 |
|
|
| 4 |
// $Ximalas$ |
// $Ximalas$ |
| 5 |
|
|
| 6 |
#if __STDC_VERSION__ < 199901L |
#if __STDC_VERSION__ < 199901L |
| 7 |
#error det er tvilsomt om du får kompilert denne kildekoden med så gammel C-kompilator |
#error det er tvilsomt om du får kompilert denne kildekoden med så gammel C-kompilator |
| 8 |
#endif |
#endif |
| 9 |
|
|
| 10 |
#include <errno.h> |
#include <errno.h> |
| 11 |
#include <pthread.h> |
#include <pthread.h> |
| 12 |
#include <signal.h> |
#include <signal.h> |
| 13 |
#include <stdbool.h> |
#include <stdbool.h> |
| 14 |
#include <stdio.h> |
#include <stdio.h> |
| 15 |
#include <stdlib.h> |
#include <stdlib.h> |
| 16 |
#include <string.h> |
#include <string.h> |