================ idThread::KillThread ================ */
| 602 | ================ |
| 603 | */ |
| 604 | void idThread::KillThread( const char *name ) { |
| 605 | int i; |
| 606 | int num; |
| 607 | int len; |
| 608 | const char *ptr; |
| 609 | idThread *thread; |
| 610 | |
| 611 | // see if the name uses a wild card |
| 612 | ptr = strchr( name, '*' ); |
| 613 | if ( ptr ) { |
| 614 | len = ptr - name; |
| 615 | } else { |
| 616 | len = strlen( name ); |
| 617 | } |
| 618 | |
| 619 | // kill only those threads whose name matches name |
| 620 | num = threadList.Num(); |
| 621 | for( i = 0; i < num; i++ ) { |
| 622 | thread = threadList[ i ]; |
| 623 | if ( !idStr::Cmpn( thread->GetThreadName(), name, len ) ) { |
| 624 | thread->End(); |
| 625 | } |
| 626 | } |
| 627 | } |
| 628 | |
| 629 | /* |
| 630 | ================ |
nothing calls this directly
no test coverage detected