- res = pthread_create(&CAN_A_to_B_thread, NULL, CAN_GW_thread, (void*)CAN_GW_A_TO_B_MODE);\r
+ pthread_attr_t attributes;\r
+ struct sched_param parm; \r
+ parm.sched_priority = CAN_GW_TASK_HIGH_PRIO;\r
+ pthread_attr_init(&attributes);\r
+#ifdef HIGH_PRIO /* Without setting PTHREAD_EXPLICIT_SCHED, thread is created with parameters inherited from this thread. */\r
+ res = pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED);\r
+#endif\r
+ pthread_attr_setschedparam(&attributes, &parm);\r
+\r
+ res = pthread_create(&CAN_A_to_B_thread, &attributes, CAN_GW_thread, (void*)CAN_GW_A_TO_B_MODE);\r