| 5853 | "thread <thread_id> pipeline <pipeline_name> enable\n"; |
| 5854 | |
| 5855 | static void |
| 5856 | cmd_thread_pipeline_enable(char **tokens, |
| 5857 | uint32_t n_tokens, |
| 5858 | char *out, |
| 5859 | size_t out_size) |
| 5860 | { |
| 5861 | char *pipeline_name; |
| 5862 | uint32_t thread_id; |
| 5863 | int status; |
| 5864 | |
| 5865 | if (n_tokens != 5) { |
| 5866 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 5867 | return; |
| 5868 | } |
| 5869 | |
| 5870 | if (parser_read_uint32(&thread_id, tokens[1]) != 0) { |
| 5871 | snprintf(out, out_size, MSG_ARG_INVALID, "thread_id"); |
| 5872 | return; |
| 5873 | } |
| 5874 | |
| 5875 | if (strcmp(tokens[2], "pipeline") != 0) { |
| 5876 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pipeline"); |
| 5877 | return; |
| 5878 | } |
| 5879 | |
| 5880 | pipeline_name = tokens[3]; |
| 5881 | |
| 5882 | if (strcmp(tokens[4], "enable") != 0) { |
| 5883 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "enable"); |
| 5884 | return; |
| 5885 | } |
| 5886 | |
| 5887 | status = thread_pipeline_enable(thread_id, pipeline_name); |
| 5888 | if (status) { |
| 5889 | snprintf(out, out_size, MSG_CMD_FAIL, "thread pipeline enable"); |
| 5890 | return; |
| 5891 | } |
| 5892 | } |
| 5893 | |
| 5894 | |
| 5895 | static const char cmd_thread_pipeline_disable_help[] = |
no test coverage detected