alibaba/AliSQL
storage/ndb/ndb_configure.cmake
:92
CHECK_C_SOURCE_COMPILES("
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <sys/types.h>
#include <unistd.h>
#include <sched.h>
#include <sys/syscall.h>
int main()
{
const cpu_set_t *p= (const cpu_set_t*)0;
struct sched_param loc_sched_param;
int policy = 0;
pid_t tid = (unsigned)syscall(SYS_gettid);
tid = getpid();
int ret = sched_setaffinity(tid, sizeof(* p), p);
ret = sched_setscheduler(tid, policy, &loc_sched_param);
}"
HAVE_LINUX_SCHEDULING)