This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __cplusplus | |
#define _GNU_SOURCE | |
#endif | |
// C standard library | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Compile: | |
* gcc -std=gnu11 -Wall -Wextra c_priority_queue_threads.c -o priority_queue_threads -lpthread -lrt | |
*/ | |
#include <errno.h> | |
#include <mqueue.h> | |
#include <fcntl.h> /* For O_* constants. */ | |
#include <sys/stat.h> /* For mode constants. */ |