Lines Matching refs:cmds
84 tlm_commands_t *cmds;
96 cmds = &nlp->nlp_cmds;
97 (void) memset(cmds, 0, sizeof (*cmds));
112 cmds->tcs_command = tlm_create_reader_writer_ipc(TRUE, xfer_size);
113 if (cmds->tcs_command == NULL) {
124 tlm_release_reader_writer_ipc(cmds->tcs_command);
153 tlm_commands_t *cmds;
164 cmds = &nlp->nlp_cmds;
165 (void) memset(cmds, 0, sizeof (*cmds));
168 cmds->tcs_command = tlm_create_reader_writer_ipc(FALSE, xfer_size);
169 if (cmds->tcs_command == NULL) {
178 tlm_release_reader_writer_ipc(cmds->tcs_command);
187 tlm_release_reader_writer_ipc(cmds->tcs_command);
272 tlm_commands_t *cmds;
278 cmds = &nlp->nlp_cmds;
279 if (cmds == NULL) {
280 NDMP_LOG(LOG_DEBUG, "cmds == NULL");
291 if (cmds->tcs_command != NULL) {
292 if (cmds->tcs_command->tc_buffers != NULL)
293 tlm_release_reader_writer_ipc(cmds->tcs_command);
296 cmds->tcs_command = NULL;
955 tlm_commands_t *cmds)
970 } else if (cmds == NULL) {
971 NDMP_LOG(LOG_DEBUG, "cmds == NULL");
978 lcmd = cmds->tcs_command;
982 cmds->tcs_writer_count++;
986 while (cmds->tcs_writer != (int)TLM_ABORT &&
1019 if (cmds->tcs_writer != (int)TLM_ABORT) {
1030 cmds->tcs_writer_count--;
1080 tlm_commands_t *cmds;
1087 cmds = argp->tr_cmds;
1093 } else if (cmds == NULL) {
1094 NDMP_LOG(LOG_DEBUG, "cmds == NULL");
1099 tlm_cmd_signal(cmds->tcs_command, TLM_TAR_READER);
1103 lcmd = cmds->tcs_command;
1107 cmds->tcs_reader_count++;
1112 tlm_cmd_signal(cmds->tcs_command, TLM_TAR_READER);
1115 while (cmds->tcs_reader == TLM_RESTORE_RUN &&
1161 cmds->tcs_reader_count--;
1179 tlm_commands_t *cmds;
1207 cmds = &nlp->nlp_cmds;
1208 cmds->tcs_reader = cmds->tcs_writer = TLM_BACKUP_RUN;
1209 cmds->tcs_command->tc_reader = TLM_BACKUP_RUN;
1210 cmds->tcs_command->tc_writer = TLM_BACKUP_RUN;
1212 if (ndmp_write_utf8magic(cmds->tcs_command) < 0) {
1220 err = ndmp_backup_reader(cmds, nlp, jname);
1229 err = ndmp_tar_writer(session, mod_params, cmds);
1276 tlm_commands_t *cmds;
1304 cmds = &nlp->nlp_cmds;
1305 cmds->tcs_reader = cmds->tcs_writer = TLM_RESTORE_RUN;
1306 cmds->tcs_command->tc_reader = TLM_RESTORE_RUN;
1307 cmds->tcs_command->tc_writer = TLM_RESTORE_RUN;
1315 arg.tr_cmds = cmds;
1320 tlm_cmd_wait(cmds->tcs_command, TLM_TAR_READER);
1326 if (!ndmp_check_utf8magic(cmds->tcs_command)) {
1338 tlm_arg.ba_commands = cmds;
1339 tlm_arg.ba_cmd = cmds->tcs_command;
1374 ndmp_stop_local_reader(session, cmds);
1375 ndmp_wait_for_reader(cmds);