This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC1311P3:CC1311P3

Guru**** 2460850 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1546490/cc1311p3-cc1311p3

器件型号:CC1311P3
主题中讨论的其他器件:test2.

工具/软件:

您好、

我创建了 3 个成功的线程、但只有一个执行他的代码、首先创建、为什么?
tirtos
此致
毫米
   
pthread_attr_init (&pAttrs);

  detachState = pthread_create_detached;

  RC = pthread_attr_setdetachstate (&pAttrs、detachState);
  IF (RC!= 0)
  {
    while (1)
      ;
  }

  RC |= pthread_attr_setstacksize (&pAttrs、THREADSTACKSIZE);
  IF (RC!= 0)
  {
    while (1)
      ;
  }

  priParam.sched_priority = 3
  pthread_attr_setschedparam (&pAttrs、&priParam);
  
  rc = pthread_create (&thread2、&pAttrs、test2、NULL);
  如果 (RC !=0){
    while (1);
  }
  

  priParam.sched_priority = 2
  pthread_attr_setschedparam (&pAttrs、&priParam);
  
  rc = pthread_create (&thread、&pAttrs、test、NULL);
  如果 (RC !=0){
    while (1);
  }

  priParam.sched_priority = 1
  pthread_attr_setschedparam (&pAttrs、&priParam);

  rc = pthread_create (&thread1、&pAttrs、test1、NULL);
  IF (RC!= 0)
  {
    while (1){}
  }
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 MM:

    第一个问题可能是阻止其余部分的执行。 您可以 查看  实现多个线程的可移植工程、以供参考。

    如果有帮助、请告诉我。

    此致、

    Daniel