<commit_before>#include "getcurrentthreadid.h"

#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>

pid_t GetCurrentThreadId()
{
    pid_t tid = 0;
#if defined(__linux__)
    tid = syscall(SYS_gettid);
#elif defined(__APPLE__) && defined(__MACH__)
    tid = syscall(SYS_thread_selfid);
#endif
    return tid;
}<commit_msg>Fixes deprecated syscall issue on macOS 10.12 (#2633) (#2675)<commit_after>#include "getcurrentthreadid.h"

#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <pthread.h>

pid_t GetCurrentThreadId()
{
    pid_t tid = 0;
#if defined(__linux__)
    tid = syscall(SYS_gettid);
#elif defined(__APPLE__) && defined(__MACH__)
    uint64_t tid64;
    pthread_threadid_np(NULL, &tid64);
    tid = (pid_t)tid64;
#endif
    return tid;
}
{'fraction_non_alphanumeric': 0.14015151515151514, 'fraction_numerical': 0.027777777777777776, 'mean_word_length': 4.962406015037594, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4545481', 'n_tokens_mistral': 330, 'n_tokens_neox': 299, 'n_words': 64}