[Bug 1922] multiple definition of `_Scheduler_CBS_Server_list'
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Fri Sep 23 16:36:45 UTC 2011
https://www.rtems.org/bugzilla/show_bug.cgi?id=1922
Gedare <giddyup44 at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |benesp16 at fel.cvut.cz,
| |giddyup44 at yahoo.com
--- Comment #3 from Gedare <giddyup44 at yahoo.com> 2011-09-23 11:36:43 CDT ---
comment #0)
> In "schedulercbs.h" we have:
>
> /**
> * List of servers. The @a Scheduler_CBS_Server is the index to the array
> * of pointers to @a _Scheduler_CBS_Server_list.
> */
> Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
>
> Here a "extern" is missing. It seems that this variable is nowhere defined.
The usual approach for globals in the score is to declare them as SCORE_EXTERN
and then define them in sapi/src/exinit.c. But since the CBS Server list
depends on a user configure option to enable it, I don't think we want to do
that. Instead would it be OK to place the definition in the
score/src/schedulercbs.c and simply declare the list as extern?
(In reply to comment #1)
> Similar problem in "testsuites/sptests/spcbssched02/system.h":
>
> /* global variables */
>
> rtems_id Task_id;
> rtems_name Task_name;
> rtems_id Task_id2;
> rtems_name Task_name2;
> rtems_task_priority Priority;
> time_t Period;
> time_t Execution;
> time_t Phase;
>
> Please avoid definitions of global variables in header files.
I guess this fix is just to declare these globals as extern and to define them
probably in the init.c file.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list