BSD-Process-Affinity
view release on metacpan or search on metacpan
Affinity.xs view on Meta::CPAN
RETVAL = newSVuv(result);
OUTPUT:
RETVAL
void
set(obj, num)
SV* obj
SV* num
ALIAS:
from_num = 1
PPCODE:
struct cpusetinfo* info = (struct cpusetinfo*)SvIV(SvRV(obj));
CPU_ZERO(&(info->mask));
UV input = SvUV(num);
if (input > 0){
int i;
for(i = 0; i < sizeof(UV) * 8; i++){
if (input & ((UV)1 << i)){
if (i > CPU_SETSIZE){
( run in 1.850 second using v1.01-cache-2.11-cpan-71847e10f99 )