Lines Matching refs:args

317 static void thread_delay_close(struct thread_args *args) {
319 sleep(args->delay);
320 _close(args->fd, args->type);
324 static void thread_poll(void *args) {
325 int fd = (int)args;
334 static void thread_read(void *args) {
335 int fd = (int)args;
341 static void thread_pollin(void *args) {
342 int fd = (int)args;
358 static void thread_accept(struct thread_args *args) {
360 sleep(args->delay);
361 _accept(args->fd, args->type);
365 static void thread_connect(struct thread_args *args) {
367 sleep(args->delay);
368 _connect(args->fd, args->type);
372 static void thread_delay_close_write(struct thread_args *args) {
374 sleep(args->delay);
375 _close(args->fd, args->type);
376 sleep(args->delay);
377 _write(args->fd, args->type);
381 static void thread_accept_write(struct thread_args *args) {
383 sleep(args->delay);
384 _accept(args->fd, args->type);
385 sleep(args->delay);
386 _write(args->fd, args->type);
390 static void thread_delay_connect(struct thread_args *args) {
392 sleep(args->delay);
393 args->fd = _socket(args->type);
394 _connect(args->fd, args->type);
421 struct thread_args args = {-1, type, 1};
430 args.fd = fd;
431 pthread_create(&thread, NULL, (void *)thread_delay_close, (void *)&args);
446 struct thread_args args = {-1, type, 0};
455 args.fd = fd;
456 pthread_create(&thread, NULL, (void *)thread_accept, (void *)&args);
474 struct thread_args args = {-1, type, 0};
479 args.fd = fd;
480 pthread_create(&thread, NULL, (void *)thread_connect, (void *)&args);
499 struct thread_args args = {-1, type, 1};
508 args.fd = fd;
509 pthread_create(&thread, NULL, (void *)thread_delay_close_write, (void *)&args);