Lines Matching defs:wt_info
893 * @param *wt_info
898 struct worker_thread_info *wt_info = (struct worker_thread_info *) arg;
901 if (wt_info->control != THREAD_START)
907 wt_info->control = THREAD_STARTED;
910 const char * path = wt_info->path;
911 int st = stat64 (path, &(wt_info->statbuf));
914 if (wt_info->control == THREAD_CANCEL)
918 free (wt_info);
921 wt_info->result = st;
922 wt_info->control = THREAD_FINISHED;
933 * @param wt_info
937 dbe_dispatch_on_thread (const char *path, struct worker_thread_info *wt_info)
939 wt_info->result = 0;
940 wt_info->control = THREAD_START;
946 wt_info->control = THREAD_NOT_CREATED;
949 wt_info->thread_id = 0;
950 wt_info->path = path;
954 wt_info->thread_num = worker_thread_number;
958 res = pthread_create (&wt_info->thread_id, &attr, &dbe_stat_on_thread, wt_info);
961 wt_info->control = THREAD_NOT_CREATED;
972 if (THREAD_FINISHED == wt_info->control)
978 if (THREAD_FINISHED != wt_info->control)
981 wt_info->control = THREAD_CANCEL; // Cannot use wt_info after that!
993 res = pthread_join (wt_info->thread_id, &resources);
1070 struct worker_thread_info *wt_info;
1071 wt_info = (worker_thread_info *) calloc (1, sizeof (worker_thread_info));
1072 if (wt_info != NULL)
1074 int res = dbe_dispatch_on_thread (path, wt_info);
1077 int st = wt_info->result;
1080 if (S_ISREG ((wt_info->statbuf).st_mode) == 0)
1083 *sbuf = wt_info->statbuf;
1084 free (wt_info);
1091 // Worker thread hung. Cannot free wt_info.
1098 free (wt_info);