src/core/common/bind.hpp
void bind_to_all()
{
    cpu_set_t mask;
    CPU_ZERO(&mask);
    for (int i = 0; i < default_bindings.size(); i++)
        CPU_SET(default_bindings[i], &mask);

    if (sched_setaffinity(0, sizeof(mask), &mask) != 0)
        logstream(LOG_ERROR) << "Fail to set affinity" << LOG_endl;
}
/*
 * Bind the current thread to all of cores
 * It would like unbind to special cores
 * and not return the previous core binding
 */
Bind the current thread to all of cores
It would like unbind to special cores
and not return the previous core binding
Bind the current thread to all of cores It would like unbind to special cores and not return the previous core binding
void bind_to_all()
{
    cpu_set_t mask;
    CPU_ZERO(&mask);
    for (int i = 0; i < default_bindings.size(); i++)
        CPU_SET(default_bindings[i], &mask);
    if (sched_setaffinity(0, sizeof(mask), &mask) != 0)
        logstream(LOG_ERROR) << "Fail to set affinity" << LOG_endl;
}
void bind_to_all ( ) { cpu_set_t mask ; CPU_ZERO ( & mask ) ; for ( int i = 0 ; i < default_bindings . size ( ) ; i ++ ) CPU_SET ( default_bindings [ i ] , & mask ) ; if ( sched_setaffinity ( 0 , sizeof ( mask ) , & mask ) != 0 ) logstream ( LOG_ERROR ) << " " << LOG_endl ; }
Bind the current thread to all of cores
 It would like unbind to special cores
 and not return the previous core binding
Bind the current thread to all of cores It would like unbind to special cores and not return the previous core binding