/** * close_all_relayfs_files - close and munmap buffers and output files */ void close_oldrelayfs(int detach) { int i; if (!bulkmode) return; dbug(2, "detach=%d, ncpus=%d\n", detach, ncpus); if (detach) { for (i = 0; i < ncpus; i++) if (reader[i]) #ifdef __ANDROID__ pthread_kill(reader[i], SIGTERM); #else pthread_cancel(reader[i]); #endif } else { for (i = 0; i < ncpus; i++) if (reader[i]) pthread_join(reader[i], NULL); } for (i = 0; i < ncpus; i++) close_relayfs_files(i); }
/** * close_all_relayfs_files - close and munmap buffers and output files */ void close_oldrelayfs(int detach) { int i; if (!bulkmode) return; dbug(2, "detach=%d, ncpus=%d\n", detach, ncpus); if (detach) { for (i = 0; i < ncpus; i++) if (reader[i]) pthread_cancel(reader[i]); } else { for (i = 0; i < ncpus; i++) if (reader[i]) pthread_join(reader[i], NULL); } for (i = 0; i < ncpus; i++) close_relayfs_files(i); }