| 64 | } AddTaskData; |
| 65 | |
| 66 | static AddTaskData _AddTaskData_New |
| 67 | ( |
| 68 | TaskFunction task_function, |
| 69 | TaskData task_data |
| 70 | ) { |
| 71 | int pipe_fds[2] = {0, 0}; |
| 72 | |
| 73 | TEST_ASSERT(pipe(pipe_fds) == 0); |
| 74 | |
| 75 | AddTaskData data = { |
| 76 | .task_function = task_function, |
| 77 | .task_data = task_data, |
| 78 | .pipe_read_fd = pipe_fds[0], |
| 79 | .pipe_write_fd = pipe_fds[1], |
| 80 | .has_started = false, |
| 81 | .has_completed = false |
| 82 | }; |
| 83 | |
| 84 | return data; |
| 85 | } |
| 86 | |
| 87 | static inline bool _AddTaskData_HasStarted |
| 88 | ( |
no outgoing calls
no test coverage detected