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
CC := gcc | |
CFLAGS := -Wall -g -std=c99 | |
LD_LIBS := -lpthread | |
ARCH := $(shell uname) | |
BLOCK_SIZE := 1m | |
ifeq ("$(strip $(ARCH))", "Linux") | |
LD_LIBS += -lrt | |
BLOCK_SIZE := 1M | |
endif | |
SRCS := prsort.c |
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
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#define likely(expr) __builtin_expect(!!(expr), 1) | |
#define unlikely(expr) __builtin_expect(!!(expr), 0) | |
#define __EXTEND_MEM (256<<10) |