<commit_before>#include "types.hh"
#include "util.hh"
#include "affinity.hh"

#if HAVE_SCHED_H
#include <sched.h>
#endif

namespace nix {


static bool didSaveAffinity = false;
static cpu_set_t savedAffinity;


void setAffinityTo(int cpu)
{
#if HAVE_SCHED_SETAFFINITY<commit_msg>Fix build on non-Linux<commit_after>#include "types.hh"
#include "util.hh"
#include "affinity.hh"

#if HAVE_SCHED_H
#include <sched.h>
#endif

namespace nix {


#if HAVE_SCHED_SETAFFINITY
static bool didSaveAffinity = false;
static cpu_set_t savedAffinity;
#endif


void setAffinityTo(int cpu)
{
#if HAVE_SCHED_SETAFFINITY
{'fraction_non_alphanumeric': 0.10149750415973377, 'fraction_numerical': 0.0, 'mean_word_length': 6.341463414634147, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4085616', 'n_tokens_mistral': 241, 'n_tokens_neox': 233, 'n_words': 55}