libcopp  1.1.0
coroutine_task_test.cpp
Go to the documentation of this file.
1 #ifdef LIBCOTASK_MACRO_ENABLED
2 
3 #include <cstdio>
4 #include <cstring>
5 #include <iostream>
6 
8 
10 #include <libcotask/task.h>
11 
12 #include "frame/test_macros.h"
13 
14 static int g_test_coroutine_task_status = 0;
15 static int g_test_coroutine_task_on_finished = 0;
16 class test_context_task_action_base : public cotask::impl::task_action_impl {
17 public:
18  // add a same name function to find the type detection error
19  virtual int operator()() = 0;
20 
21  int operator()(void *priv_data) {
22  ++g_test_coroutine_task_status;
23 
24  CASE_EXPECT_EQ(&g_test_coroutine_task_status, priv_data);
25 
27  cotask::this_task::get_task()->yield(&priv_data);
29 
31 
32  ++g_test_coroutine_task_status;
33 
34  return 0;
35  }
36 
37  virtual int on_finished(cotask::impl::task_impl &t) {
38  ++g_test_coroutine_task_on_finished;
39  return 0;
40  }
41 };
42 
43 class test_context_task_action : public test_context_task_action_base {
44 public:
45  using test_context_task_action_base::operator();
46 
47  // add a same name function to find the type detection error
48  virtual int operator()() { return 0; }
49 };
50 
51 
52 CASE_TEST(coroutine_task, custom_action) {
54  g_test_coroutine_task_status = 0;
55  g_test_coroutine_task_on_finished = 0;
56 
57  {
58  task_ptr_type co_task = cotask::task<>::create(test_context_task_action());
59  task_ptr_type co_another_task = cotask::task<>::create(test_context_task_action()); // share action
60 
61  CASE_EXPECT_EQ(cotask::EN_TS_CREATED, co_task->get_status());
62  CASE_EXPECT_EQ(cotask::EN_TS_CREATED, co_another_task->get_status());
63 
64  CASE_EXPECT_EQ(0, co_task->start(&g_test_coroutine_task_status));
65 
66  CASE_EXPECT_EQ(g_test_coroutine_task_status, 1);
67  CASE_EXPECT_FALSE(co_task->is_completed());
68  CASE_EXPECT_FALSE(co_task->is_canceled());
69  CASE_EXPECT_FALSE(co_task->is_faulted());
70 
71  CASE_EXPECT_EQ(0, co_another_task->start(&g_test_coroutine_task_status));
72  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
73 
74  CASE_EXPECT_EQ(cotask::EN_TS_WAITING, co_task->get_status());
75  CASE_EXPECT_EQ(cotask::EN_TS_WAITING, co_another_task->get_status());
76 
77  CASE_EXPECT_EQ(0, co_task->resume(co_task.get()));
78  CASE_EXPECT_EQ(g_test_coroutine_task_status, 3);
79 
80  CASE_EXPECT_EQ(0, co_another_task->resume(co_another_task.get()));
81  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
82 
83  CASE_EXPECT_TRUE(co_task->is_completed());
84  CASE_EXPECT_TRUE(co_another_task->is_completed());
85  CASE_EXPECT_FALSE(co_task->is_canceled());
86  CASE_EXPECT_FALSE(co_task->is_faulted());
87 
88  CASE_EXPECT_GT(0, co_another_task->resume(co_another_task.get()));
89  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
90 
91  ++g_test_coroutine_task_status;
92  CASE_EXPECT_EQ(g_test_coroutine_task_status, 5);
93 
94  CASE_EXPECT_NE(co_task->get_id(), 0);
95  }
96 
97  CASE_EXPECT_EQ(g_test_coroutine_task_on_finished, 2);
98 }
99 
100 
101 struct test_context_task_functor {
102 public:
103  int operator()(void *) const {
104  ++g_test_coroutine_task_status;
105  CASE_EXPECT_EQ(g_test_coroutine_task_status, 1);
106 
108 
109  ++g_test_coroutine_task_status;
110  CASE_EXPECT_EQ(g_test_coroutine_task_status, 3);
111 
112  return 0;
113  }
114 };
115 
116 CASE_TEST(coroutine_task, functor_action) {
118  task_ptr_type co_task = cotask::task<>::create(test_context_task_functor());
119  g_test_coroutine_task_status = 0;
120 
121  CASE_EXPECT_EQ(0, co_task->start());
122 
123  ++g_test_coroutine_task_status;
124  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
125 
126  CASE_EXPECT_FALSE(co_task->is_completed());
127  CASE_EXPECT_EQ(0, co_task->resume());
128 
129  CASE_EXPECT_TRUE(co_task->is_completed());
130 
131  ++g_test_coroutine_task_status;
132  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
133 
134  CASE_EXPECT_NE(co_task->get_id(), 0);
135 }
136 
137 
138 static int test_context_task_function_1(void *) {
139  ++g_test_coroutine_task_status;
140  CASE_EXPECT_EQ(g_test_coroutine_task_status, 1);
141 
143 
144  ++g_test_coroutine_task_status;
145  CASE_EXPECT_EQ(g_test_coroutine_task_status, 3);
146 
147  return 100;
148 }
149 
150 static void test_context_task_function_2(void *) {
151  ++g_test_coroutine_task_status;
152  CASE_EXPECT_EQ(g_test_coroutine_task_status, 1);
153 
155 
156  ++g_test_coroutine_task_status;
157  CASE_EXPECT_EQ(g_test_coroutine_task_status, 3);
158 }
159 
160 CASE_TEST(coroutine_task, function_action) {
161  {
163  task_ptr_type co_task = cotask::task<>::create(test_context_task_function_1);
164  g_test_coroutine_task_status = 0;
165 
166  CASE_EXPECT_EQ(0, co_task->start());
167 
168  ++g_test_coroutine_task_status;
169  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
170 
171  CASE_EXPECT_FALSE(co_task->is_completed());
172  CASE_EXPECT_EQ(0, co_task->resume());
173 
174  CASE_EXPECT_TRUE(co_task->is_completed());
175 
176  ++g_test_coroutine_task_status;
177  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
178  CASE_EXPECT_EQ(co_task->get_coroutine_context()->get_ret_code(), 100);
179  }
180 
181  {
183  task_ptr_type co_task = cotask::task<>::create(test_context_task_function_2);
184  g_test_coroutine_task_status = 0;
185 
186  CASE_EXPECT_EQ(0, co_task->start());
187 
188  ++g_test_coroutine_task_status;
189  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
190 
191  CASE_EXPECT_FALSE(co_task->is_completed());
192  CASE_EXPECT_EQ(0, co_task->resume());
193 
194  CASE_EXPECT_TRUE(co_task->is_completed());
195 
196  ++g_test_coroutine_task_status;
197  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
198  }
199 }
200 
201 // task start and coroutine context yield
202 static void test_context_task_function_3(void *) {
203  ++g_test_coroutine_task_status;
204  CASE_EXPECT_EQ(g_test_coroutine_task_status, 1);
205 
207 
209 
211 
212  ++g_test_coroutine_task_status;
213  CASE_EXPECT_EQ(g_test_coroutine_task_status, 3);
214 }
215 
216 CASE_TEST(coroutine_task, coroutine_context_yield) {
218  task_ptr_type co_task = cotask::task<>::create(test_context_task_function_3);
219  g_test_coroutine_task_status = 0;
220 
221  CASE_EXPECT_EQ(0, co_task->start());
222 
223  ++g_test_coroutine_task_status;
224  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
225 
226  CASE_EXPECT_FALSE(co_task->is_completed());
227  CASE_EXPECT_EQ(cotask::EN_TS_WAITING, co_task->get_status());
228  CASE_EXPECT_EQ(0, co_task->resume());
229 
230  CASE_EXPECT_TRUE(co_task->is_completed());
231 
232  ++g_test_coroutine_task_status;
233  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
234 
235  CASE_EXPECT_NE(co_task->get_id(), 0);
236 }
237 
238 
239 struct test_context_task_mem_function {
240  cotask::task<>::id_t task_id_;
241 
242  int real_run(void *) {
243  ++g_test_coroutine_task_status;
244  CASE_EXPECT_EQ(g_test_coroutine_task_status, 1);
245 
246  CASE_EXPECT_EQ(task_id_, cotask::task<>::this_task()->get_id());
248  CASE_EXPECT_EQ(task_id_, cotask::task<>::this_task()->get_id());
249 
250  ++g_test_coroutine_task_status;
251  CASE_EXPECT_EQ(g_test_coroutine_task_status, 3);
252 
253  return -1;
254  }
255 };
256 
257 CASE_TEST(coroutine_task, mem_function_action) {
259  test_context_task_mem_function obj;
260  task_ptr_type co_task = cotask::task<>::create(&test_context_task_mem_function::real_run, &obj);
261  g_test_coroutine_task_status = 0;
262  obj.task_id_ = co_task->get_id();
263 
264  CASE_EXPECT_EQ(0, co_task->start());
265 
266  ++g_test_coroutine_task_status;
267  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
268 
269  CASE_EXPECT_FALSE(co_task->is_completed());
270  CASE_EXPECT_EQ(0, co_task->resume());
271 
272  CASE_EXPECT_TRUE(co_task->is_completed());
273 
274  ++g_test_coroutine_task_status;
275  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
276 
277  CASE_EXPECT_NE(co_task->get_coroutine_context()->get_ret_code(), -1);
278 }
279 
280 CASE_TEST(coroutine_task, auto_finish) {
282  {
283  test_context_task_mem_function obj;
284  task_ptr_type co_task = cotask::task<>::create(&test_context_task_mem_function::real_run, &obj);
285  g_test_coroutine_task_status = 0;
286  obj.task_id_ = co_task->get_id();
287  }
288  CASE_EXPECT_EQ(0, g_test_coroutine_task_status);
289 
290  {
291  test_context_task_mem_function obj;
292  task_ptr_type co_task = cotask::task<>::create(&test_context_task_mem_function::real_run, &obj);
293  g_test_coroutine_task_status = 0;
294  obj.task_id_ = co_task->get_id();
295 
296  CASE_EXPECT_EQ(0, co_task->start());
297 
298  ++g_test_coroutine_task_status;
299  CASE_EXPECT_EQ(g_test_coroutine_task_status, 2);
300 
301  CASE_EXPECT_FALSE(co_task->is_completed());
302  }
303 
304  ++g_test_coroutine_task_status;
305  CASE_EXPECT_EQ(g_test_coroutine_task_status, 4);
306 }
307 
308 struct test_context_task_next_action : public cotask::impl::task_action_impl {
309  int set_;
310  int check_;
311  test_context_task_next_action(int s, int c) : cotask::impl::task_action_impl(), set_(s), check_(c) {}
312 
313  int operator()(void *) {
314  CASE_EXPECT_EQ(g_test_coroutine_task_status, check_);
315  g_test_coroutine_task_status = set_;
316 
318 
319  ++g_test_coroutine_task_on_finished;
320  return 0;
321  }
322 };
323 
324 CASE_TEST(coroutine_task, next) {
326  g_test_coroutine_task_status = 0;
327 
328  task_ptr_type co_task = cotask::task<>::create(test_context_task_next_action(15, 0));
329  co_task->next(test_context_task_next_action(7, 15))
330  ->next(test_context_task_next_action(99, 7))
331  ->next(test_context_task_next_action(1023, 99))
332  ->next(test_context_task_next_action(5, 1023));
333 
334  CASE_EXPECT_EQ(0, co_task->start());
335  CASE_EXPECT_EQ(g_test_coroutine_task_status, 5);
336 
338 }
339 
340 #if defined(UTIL_CONFIG_COMPILER_CXX_VARIADIC_TEMPLATES) && UTIL_CONFIG_COMPILER_CXX_VARIADIC_TEMPLATES
341 
342 struct test_context_task_functor_drived : public cotask::impl::task_action_impl {
343 public:
344  int a_;
345  int b_;
346  test_context_task_functor_drived(int a, int b) : a_(a), b_(b) {}
347 
348  virtual int operator()(void *) {
349  CASE_EXPECT_EQ(a_, 1);
350  CASE_EXPECT_EQ(3, b_);
351 
352  return 0;
353  }
354 };
355 
356 CASE_TEST(coroutine_task, functor_drived_action) {
359  task_ptr_type co_task = cotask::task<>::create_with<test_context_task_functor_drived>(alloc, 0, 0, 1, 3);
360  CASE_EXPECT_EQ(0, co_task->start());
361 }
362 
363 #endif
364 
365 
366 static int test_context_task_priavte_buffer(void *) {
367 
368  void * priv_data = cotask::task<>::this_task()->get_private_buffer();
370 
371 
372  CASE_EXPECT_GE(priv_sz, 256);
373 
374  if (priv_sz >= 256) {
375  char checked_data[256];
376  memset(checked_data, 0x5e, 256);
377 
378  CASE_EXPECT_EQ(0, memcmp(priv_data, checked_data, 256));
379  }
380 
381  return 0;
382 }
383 
384 CASE_TEST(coroutine_task, priavte_buffer) {
386  task_ptr_type co_task = cotask::task<>::create(test_context_task_priavte_buffer, 16384, 256);
387 
388  void *priv_data = co_task->get_private_buffer();
389  memset(priv_data, 0x5e, 256);
390 
391  CASE_EXPECT_EQ(0, co_task->start());
392 }
393 
394 static int test_context_task_timeout(void *) {
395 
397 
400  CASE_EXPECT_FALSE(cotask::task<>::this_task()->is_completed());
402 
403  return 0;
404 }
405 
406 CASE_TEST(coroutine_task, kill_and_timeout) {
408  task_ptr_type co_task = cotask::task<>::create(test_context_task_timeout, 16384, 256);
409 
410  void *priv_data = co_task->get_private_buffer();
411  memset(priv_data, 0x5e, 256);
412 
413  CASE_EXPECT_EQ(0, co_task->start());
414 
415  CASE_EXPECT_FALSE(co_task->is_timeout());
416  CASE_EXPECT_FALSE(co_task->is_faulted());
417  CASE_EXPECT_FALSE(co_task->is_completed());
418  CASE_EXPECT_FALSE(co_task->is_exiting());
419 
420  CASE_EXPECT_EQ(0, co_task->kill(cotask::EN_TS_TIMEOUT, NULL));
421 
422  CASE_EXPECT_TRUE(co_task->is_completed());
423 
424  CASE_EXPECT_NE(NULL, co_task->get_raw_action());
425 }
426 
427 
428 static int test_context_task_await_1(void *) {
429 
431 
432  task_ptr_type self = cotask::task<>::this_task();
433 
434  CASE_EXPECT_EQ(copp::COPP_EC_ARGS_ERROR, self->await(NULL));
436 
437 
438  void * priv_data = self->get_private_buffer();
439  cotask::task<>::self_t *other_task = *reinterpret_cast<cotask::task<>::self_t **>(priv_data);
440 
441 
442  if (other_task->is_exiting()) {
443  CASE_EXPECT_EQ(copp::COPP_EC_TASK_IS_EXITING, self->await(other_task));
444  } else {
445  if (self->is_exiting()) {
446  CASE_EXPECT_EQ(copp::COPP_EC_TASK_IS_EXITING, self->await(other_task));
447  } else {
448  CASE_EXPECT_EQ(0, self->await(other_task));
449  }
450  }
451 
452  return 0;
453 }
454 
455 static int test_context_task_await_2(void *) { return 0; }
456 
457 CASE_TEST(coroutine_task, await) {
459 
460  // normal
461  {
462  task_ptr_type co_task_1 = cotask::task<>::create(test_context_task_await_1, 16384, sizeof(cotask::task<>::self_t *));
463  task_ptr_type co_task_2 = cotask::task<>::create(test_context_task_await_2, 16384);
464 
465  void *priv_data = co_task_1->get_private_buffer();
466 
467  *reinterpret_cast<cotask::task<>::self_t **>(priv_data) = co_task_2.get();
468  CASE_EXPECT_EQ(copp::COPP_EC_TASK_NOT_IN_ACTION, co_task_1->await(co_task_2));
469 
470  CASE_EXPECT_FALSE(co_task_1->is_exiting());
471  CASE_EXPECT_FALSE(co_task_2->is_exiting());
472 
473  co_task_1->start();
474  CASE_EXPECT_FALSE(co_task_1->is_exiting());
475  CASE_EXPECT_FALSE(co_task_2->is_exiting());
476 
477  co_task_2->start();
478  CASE_EXPECT_TRUE(co_task_1->is_exiting());
479  CASE_EXPECT_TRUE(co_task_2->is_exiting());
480  }
481 
482  // co_task_1 exiting
483  {
484  task_ptr_type co_task_1 = cotask::task<>::create(test_context_task_await_1, 16384, sizeof(cotask::task<>::self_t *));
485  task_ptr_type co_task_2 = cotask::task<>::create(test_context_task_await_2, 16384);
486 
487  void *priv_data = co_task_1->get_private_buffer();
488 
489  *reinterpret_cast<cotask::task<>::self_t **>(priv_data) = co_task_2.get();
490  CASE_EXPECT_EQ(copp::COPP_EC_TASK_NOT_IN_ACTION, co_task_1->await(co_task_2));
491 
492  CASE_EXPECT_FALSE(co_task_1->is_exiting());
493  CASE_EXPECT_FALSE(co_task_2->is_exiting());
494 
495  co_task_1->kill(cotask::EN_TS_TIMEOUT);
496  CASE_EXPECT_TRUE(co_task_1->is_exiting());
497  co_task_1->start();
498  CASE_EXPECT_TRUE(co_task_1->is_exiting());
499  CASE_EXPECT_FALSE(co_task_2->is_exiting());
500 
501  co_task_2->start();
502  CASE_EXPECT_TRUE(co_task_1->is_exiting());
503  CASE_EXPECT_TRUE(co_task_2->is_exiting());
504  }
505 
506  // co_task_2 exiting
507  {
508  task_ptr_type co_task_1 = cotask::task<>::create(test_context_task_await_1, 16384, sizeof(cotask::task<>::self_t *));
509  task_ptr_type co_task_2 = cotask::task<>::create(test_context_task_await_2, 16384);
510 
511  void *priv_data = co_task_1->get_private_buffer();
512 
513  *reinterpret_cast<cotask::task<>::self_t **>(priv_data) = co_task_2.get();
514  CASE_EXPECT_EQ(copp::COPP_EC_TASK_NOT_IN_ACTION, co_task_1->await(co_task_2));
515 
516  CASE_EXPECT_FALSE(co_task_1->is_exiting());
517  CASE_EXPECT_FALSE(co_task_2->is_exiting());
518 
519  co_task_2->start();
520  CASE_EXPECT_FALSE(co_task_1->is_exiting());
521  CASE_EXPECT_TRUE(co_task_2->is_exiting());
522 
523  co_task_1->start();
524  CASE_EXPECT_TRUE(co_task_1->is_exiting());
525  CASE_EXPECT_TRUE(co_task_2->is_exiting());
526  }
527 }
528 
529 static int test_context_task_then_action_func(void *priv_data) {
530  CASE_EXPECT_EQ(&g_test_coroutine_task_status, priv_data);
531  ++g_test_coroutine_task_on_finished;
532  return 0;
533 }
534 
535 CASE_TEST(coroutine_task, then) {
537  g_test_coroutine_task_status = 0;
538  g_test_coroutine_task_on_finished = 0;
539 
540  task_ptr_type co_task = cotask::task<>::create(test_context_task_next_action(15, 0));
541  co_task->then(test_context_task_next_action(7, 15))
542  ->then(test_context_task_next_action(99, 7))
543  ->then(test_context_task_next_action(1023, 99))
544  ->then(test_context_task_next_action(5, 1023));
545 
546 
547  CASE_EXPECT_EQ(0, co_task->start());
548  CASE_EXPECT_EQ(g_test_coroutine_task_status, 5);
549 
551 
552  CASE_EXPECT_TRUE(co_task->is_exiting());
553  CASE_EXPECT_TRUE(co_task->is_completed());
554 
555  co_task->then(test_context_task_next_action(127, 5))->then(test_context_task_then_action_func, &g_test_coroutine_task_status);
556  CASE_EXPECT_EQ(g_test_coroutine_task_status, 127);
557  CASE_EXPECT_EQ(g_test_coroutine_task_on_finished, 7);
558 }
559 
560 
561 typedef copp::stack_pool<copp::allocator::stack_allocator_malloc> test_context_task_stack_pool_t;
562 struct test_context_task_stack_pool_test_macro_coroutine {
564 
566 };
567 
568 typedef cotask::task<test_context_task_stack_pool_test_macro_coroutine> test_context_task_stack_pool_test_task_t;
569 
570 CASE_TEST(coroutine_task, then_with_stack_pool) {
571  typedef test_context_task_stack_pool_test_task_t::ptr_t task_ptr_type;
572  test_context_task_stack_pool_t::ptr_t stack_pool = test_context_task_stack_pool_t::create();
573 
574  g_test_coroutine_task_on_finished = 0;
575  g_test_coroutine_task_status = 0;
576 
578  task_ptr_type tp = test_context_task_stack_pool_test_task_t::create(test_context_task_next_action(15, 0), base_alloc);
579  tp->then(test_context_task_next_action(127, 15))->then(test_context_task_then_action_func, &g_test_coroutine_task_status);
580 
581  CASE_EXPECT_EQ(3, stack_pool->get_limit().used_stack_number);
582  tp->start();
583  CASE_EXPECT_EQ(1, stack_pool->get_limit().used_stack_number);
584 
585  tp->then(test_context_task_next_action(255, 127))->then(test_context_task_then_action_func, &g_test_coroutine_task_status);
586 
587  CASE_EXPECT_EQ(1, stack_pool->get_limit().used_stack_number);
588  CASE_EXPECT_EQ(g_test_coroutine_task_status, 255);
589  CASE_EXPECT_EQ(g_test_coroutine_task_on_finished, 5);
590 }
591 
592 #endif
#define CASE_TEST(test_name, case_name)
Definition: test_macros.h:43
#define CASE_EXPECT_GT(l, r)
Definition: test_macros.h:66
virtual int operator()(void *)=0
COPP_EC_TASK_IS_EXITING.
Definition: errno.h:36
COPP_EC_TASK_CAN_NOT_WAIT_SELF.
Definition: errno.h:35
size_t get_private_buffer_size()
Definition: task.h:597
COPP_EC_ALREADY_FINISHED.
Definition: errno.h:27
bool is_exiting() const UTIL_CONFIG_NOEXCEPT
check if a cotask is exiting
Definition: task_impl.cpp:34
#define CASE_EXPECT_EQ(l, r)
Definition: test_macros.h:62
#define CASE_EXPECT_TRUE(c)
Definition: test_macros.h:60
virtual int yield(void **priv_data) UTIL_CONFIG_OVERRIDE
Definition: task.h:523
COPP_EC_IS_RUNNING.
Definition: errno.h:26
Tt * get()
get current running task and try to convert type
Definition: this_task.h:31
static ptr_t create(const Ty &functor, size_t stack_size=0, size_t private_buffer_size=0)
create task with functor
Definition: task.h:155
macro_task_t::id_t id_t
Definition: task.h:37
int yield(void **priv_data=UTIL_CONFIG_NULLPTR)
yield current coroutine
#define CASE_EXPECT_NE(l, r)
Definition: test_macros.h:63
导入智能指针库 Licensed under the MIT licenses.
#define CASE_EXPECT_GE(l, r)
Definition: test_macros.h:67
coroutine container contain stack context, stack allocator and runtime fcontext
impl::task_impl * get_task() UTIL_CONFIG_NOEXCEPT
get current running task
Definition: this_task.cpp:15
COPP_EC_TASK_NOT_IN_ACTION.
Definition: errno.h:38
static self_t * this_task()
Definition: task.h:436
element_type * get() const UTIL_CONFIG_NOEXCEPT
void * get_private_buffer()
Definition: task.h:589
memory allocator this allocator will maintain buffer using malloc/free function
virtual int on_finished(task_impl &)
#define CASE_EXPECT_FALSE(c)
Definition: test_macros.h:61
virtual int yield(void **priv_data)=0
my_task_t::ptr_t task_ptr_type
COPP_EC_ARGS_ERROR.
Definition: errno.h:30