���̷߳�ʽ PING ���Ŀ���ַ��ÿ���̲߳���ͬ�� PING ��ʽ */
| 168 | |
| 169 | /* ���̷߳�ʽ PING ���Ŀ���ַ��ÿ���̲߳���ͬ�� PING ��ʽ */ |
| 170 | static void ping_main_threads(const ACL_ARGV *ip_list, int npkt) |
| 171 | { |
| 172 | int i, n; |
| 173 | acl_pthread_t tids[128]; |
| 174 | acl_pthread_attr_t attr; |
| 175 | |
| 176 | __npkt = npkt; |
| 177 | acl_pthread_attr_init(&attr); |
| 178 | acl_pthread_attr_setdetachstate(&attr, 0); |
| 179 | |
| 180 | /* ��ÿ�������߳�������ֹϵͳ����̫�� */ |
| 181 | n = ip_list->argc > 128 ? 128 : ip_list->argc; |
| 182 | for (i = 0; i < n; i++) |
| 183 | /* ���� PING �߳� */ |
| 184 | acl_pthread_create(&tids[i], &attr, ping_thread, ip_list->argv[i]); |
| 185 | |
| 186 | for (i = 0; i < n; i++) |
| 187 | /* �����߳�״̬ */ |
| 188 | acl_pthread_join(tids[i], NULL); |
| 189 | } |
| 190 | |
| 191 | static void usage(const char* progname) |
| 192 | { |
no test coverage detected
searching dependent graphs…