Lines Matching refs:statep
78 } *statep;
157 if (statep->hwd[i].hwd_pid != 0)
158 kill(statep->hwd[i].hwd_pid, SIGTERM);
166 statep->hwd[curthread].hwd_start_signal_barrier = 1;
178 if (statep->hwd[curthread].hwd_start_signal_barrier)
189 if (statep->hwd[i].hwd_pid != 0)
190 kill(statep->hwd[i].hwd_pid, SIGHUP);
201 ret = pthread_barrier_wait(&statep->start_barrier);
209 while (!statep->run_done) {
210 if (http_fetch(&statep->sin, statep->path, QUIET) < 0) {
215 if (!statep->run_done)
286 statep = (struct state *)pagebuffer;
288 bzero(&statep->sin, sizeof(statep->sin));
289 statep->sin.sin_len = sizeof(statep->sin);
290 statep->sin.sin_family = AF_INET;
291 statep->sin.sin_addr.s_addr = inet_addr(argv[0]);
292 statep->sin.sin_port = htons(atoi(argv[1]));
293 statep->path = argv[2];
298 if (http_fetch(&statep->sin, statep->path, 0) < 0)
302 if (pthread_barrier_init(&statep->start_barrier, NULL,
308 statep->hwd[i].hwd_count = 0;
310 if (pthread_create(&statep->hwd[i].hwd_thread, NULL,
311 http_worker, &statep->hwd[i]) != 0)
323 http_worker(&statep->hwd[i]);
327 statep->hwd[i].hwd_pid = pid;
336 statep->run_done = 1;
341 if (pthread_join(statep->hwd[i].hwd_thread, NULL)
345 pid = waitpid(statep->hwd[i].hwd_pid, NULL, 0);
346 if (pid == statep->hwd[i].hwd_pid)
347 statep->hwd[i].hwd_pid = 0;
354 total += statep->hwd[i].hwd_count;
358 total += statep->hwd[i].hwd_errorcount;