FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2007 Threads] Why use __line__ instead of constantPosted by a_shawky on February 22, 2007 Dear All,
kindly can any one clear this point to me?
in COROUTINE.H header file i found this defination
from coroutine.h----------------------------------------------------- #define crSET_STATE0( xHandle ) ( ( corCRCB * )xHandle)->uxState = (__LINE__ * 2); return; case (__LINE__ * 2): #define crSET_STATE1( xHandle ) ( ( corCRCB * )xHandle)->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1): --------------------------------------------------------------------
what is "__line__"? and why "__line__" is used instead of a constant.
best regards
ashawky
RE: Why use __line__ instead of constantPosted by Richard on February 22, 2007 ...because each use of the macros has to have a unique number, using the line number is the easiest way of doing this. The generated numbers are used as 'cases' in a switch statement so need all be unique.
As an aside - I tried replying to your email but it bounced. I have some TMS470 code I can send but it is based on an old version and I have not tested it myself. I will need a non SourceForge address if you want me to send it. Do not post email addresses in this forum however.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|