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
#include <pthread.h> | |
#include <stdio.h> | |
#ifdef NOTLS | |
int var = 0; | |
#else | |
__thread int var = 0; | |
#endif | |
void *func(void *arg) { |
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
#include <fcntl.h> | |
#include <limits.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
#define CHUNK_SIZE 0xF0000 |
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
#!/bin/sh | |
# shellcheck disable=2317 | |
servicename="minecraft" | |
[ "${0%/*}" = "$0" ] && SRVROOT="." || SRVROOT="${0%/*}" | |
cd "$SRVROOT" || exit 1 | |
SRVROOT="$PWD" | |
cd "$SRVROOT" || { printf "Server root directory %s not found." "$SRVROOT" ; exit 1; } |