================ idThread::KillThread ================ */
| 624 | ================ |
| 625 | */ |
| 626 | void idThread::KillThread( const char *name ) { |
| 627 | int i; |
| 628 | int num; |
| 629 | int len; |
| 630 | const char *ptr; |
| 631 | idThread *thread; |
| 632 | |
| 633 | // see if the name uses a wild card |
| 634 | ptr = strchr( name, '*' ); |
| 635 | if ( ptr ) { |
| 636 | len = ptr - name; |
| 637 | } else { |
| 638 | len = strlen( name ); |
| 639 | } |
| 640 | |
| 641 | // kill only those threads whose name matches name |
| 642 | num = threadList.Num(); |
| 643 | for( i = 0; i < num; i++ ) { |
| 644 | thread = threadList[ i ]; |
| 645 | if ( !idStr::Cmpn( thread->GetThreadName(), name, len ) ) { |
| 646 | thread->End(); |
| 647 | } |
| 648 | } |
| 649 | } |
| 650 | |
| 651 | /* |
| 652 | ================ |
nothing calls this directly
no test coverage detected