Browse Subversion Repository
Diff of /branches/mty-makai/mty.c
Parent Directory
| Revision Log
| Patch
| 1025 |
#define thread_clear_event(ev) ResetEvent(ev) |
#define thread_clear_event(ev) ResetEvent(ev) |
| 1026 |
#define thread_get_tid() GetCurrentThread() |
#define thread_get_tid() GetCurrentThread() |
| 1027 |
#define thread_set_priority(tid,n) SetThreadPriority(tid, n) |
#define thread_set_priority(tid,n) SetThreadPriority(tid, n) |
| 1028 |
|
#if 0 |
| 1029 |
|
#undef thread_set_priority /* MAKAI */ |
| 1030 |
|
#endif |
| 1031 |
#define thread_set_affinity(tid,m) SetThreadAffinityMask(tid, (DWORD_PTR)1 << (m)) |
#define thread_set_affinity(tid,m) SetThreadAffinityMask(tid, (DWORD_PTR)1 << (m)) |
| 1032 |
|
|
| 1033 |
static |
static |
| 1501 |
break; |
break; |
| 1502 |
} |
} |
| 1503 |
} |
} |
| 1504 |
|
if ( pmask < MIN_THREAD ) { |
| 1505 |
|
usage( argv[0] ); |
| 1506 |
|
exit( 1 ); |
| 1507 |
|
} |
| 1508 |
break; |
break; |
| 1509 |
case 'h': |
case 'h': |
| 1510 |
usage( argv[0] ); |
usage( argv[0] ); |
| 1556 |
proc_mask = thread_avail(); |
proc_mask = thread_avail(); |
| 1557 |
} else { |
} else { |
| 1558 |
proc_mask = pmask; |
proc_mask = pmask; |
| 1559 |
printf( "%d 個の検索スレッドを生成\n", popcnt64( proc_mask ) ); |
printf( "CPU : " ); |
| 1560 |
|
for ( i = 0; i < MAX_THREAD; i++ ) { |
| 1561 |
|
if ( pmask & 1 ) { |
| 1562 |
|
printf( "%d ", i ); |
| 1563 |
|
} |
| 1564 |
|
pmask >>= 1; |
| 1565 |
|
} |
| 1566 |
|
printf( "を使用します。\n" ); |
| 1567 |
|
#ifdef WIN32 |
| 1568 |
|
SetProcessAffinityMask( GetCurrentProcess(), proc_mask ); |
| 1569 |
|
#endif /* WIN32 */ |
| 1570 |
} |
} |
| 1571 |
} else { |
} else { |
| 1572 |
int i; |
int i; |
| 1579 |
} |
} |
| 1580 |
/* MAKAI end */ |
/* MAKAI end */ |
| 1581 |
|
|
| 1582 |
if (proc_mask == 1U) |
if (popcnt64(proc_mask) == 1) /* MAKAI */ |
| 1583 |
{ |
{ |
| 1584 |
/* single */ |
/* single */ |
| 1585 |
npkts = 1; |
npkts = 1; |
|
|
Legend:
| Removed from v.199 |
|
| changed lines |
| |
Added in v.200 |
|
|
| |