Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329408

Summary: Modules that inherit must not be allowed to omit Instance_State
Product: [Technology] RTSC Reporter: Sasha Slijepcevic <sascha>
Component: CoreAssignee: Sasha Slijepcevic <sascha>
Status: CLOSED INVALID QA Contact:
Severity: major    
Priority: P3 CC: c-mccormick, d-russo
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Sasha Slijepcevic CLA 2010-11-03 20:01:12 EDT
A module that does not inherit from an interface and has an 'instance' section, must also define Instance_State even if that structure does not have any members. Otherwise, an error saying that Instance_State is missing is displayed. But, for modules that inherit from an interface that has 'instance' section, we allow the structure 'Instance_State' to be omitted. For example, ti.sysbios.gates.GateHwi inherits from xdc.runtime.IGatesProvider, but Instance_State is not defined in GateHwi.xdc.
Comment 1 Sasha Slijepcevic CLA 2010-12-21 15:55:45 EST
The error message comes from xdc.services.spec.Unit. Previously, the existence of Instance_State wasn't flagged by Unit.pass2check(). This is fixed in xdc-w19, and all modules inheriting from an interface that has an 'instance' section must declare Instance_State.
Comment 2 Dave Russo CLA 2011-01-07 11:45:30 EST
Why not make it possible for modules without instance state to not have to declare an empty Instace_State?

The empty structure statements are not valid C and seem unnecessary for modules that don't need the state.
Comment 3 Sasha Slijepcevic CLA 2011-01-14 21:07:11 EST
In, xdc-w22 I made further changes that allow leaving out empty Instance_State structures and Instance_init functions. This makes this bug invalid.
Comment 4 Dave Russo CLA 2011-11-09 18:55:32 EST
closing "ancient" resolved bugs