rlen = read(ctl_fd, buf, sizeof(buf)); if (rlen < 0) {
pr_err("read data error in ctl thread\n"); goto error;
}
if (rlen == 2 && buf[0] == '1') { /* * If host writes '1' to a control path, * this controller wakes all read/write threads.
*/
global_run_operation = true;
pthread_cond_broadcast(&cond_wakeup);
pr_debug("Wake up all read/write threads\n");
} elseif (rlen == 2 && buf[0] == '0') { /* * If host writes '0' to a control path, read/write * threads will wait for notification from Host.
*/
global_run_operation = false;
pr_debug("Stop all read/write threads\n");
} else
pr_info("Invalid host notification: %s\n", buf);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.