----------------------------------------------------------------------------*/
| 355 | } |
| 356 | /*----------------------------------------------------------------------------*/ |
| 357 | int main(int argc, char *argv[] ) |
| 358 | { |
| 359 | int core =0; |
| 360 | |
| 361 | if(argc >= 2) |
| 362 | { |
| 363 | core = atoi(argv[1]); |
| 364 | printf("affinity to core %d \n", core); |
| 365 | } |
| 366 | else |
| 367 | { |
| 368 | printf("affinity to 0 core by default \n"); |
| 369 | } |
| 370 | |
| 371 | /*initialize thread bind cpu*/ |
| 372 | cpu_set_t cpus; |
| 373 | CPU_ZERO(&cpus); |
| 374 | CPU_SET((unsigned)core, &cpus); |
| 375 | sched_setaffinity(0, sizeof(cpus), &cpus); |
| 376 | |
| 377 | RunHttpsThread(); |
| 378 | |
| 379 | |
| 380 | } |
| 381 | |
| 382 |
nothing calls this directly
no test coverage detected